vboxsf: Fix the check for the old binary mount-arguments struct
authorHans de Goede <hdegoede@redhat.com>
Tue, 25 Aug 2020 11:12:57 +0000 (13:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Oct 2020 06:02:47 +0000 (08:02 +0200)
commit057c9ed4565b42bb51a6636e9aa11963122d895a
treef3c1d0df91130e5bcfe3b13b56bea7b8cfad2426
parent4a1db91e697a2cb2eb5061a08560f884221f915c
vboxsf: Fix the check for the old binary mount-arguments struct

[ Upstream commit 9d682ea6bcc76b8b2691c79add59f7d99c881635 ]

Fix the check for the mainline vboxsf code being used with the old
mount.vboxsf mount binary from the out-of-tree vboxsf version doing
a comparison between signed and unsigned data types.

This fixes the following smatch warnings:

fs/vboxsf/super.c:390 vboxsf_parse_monolithic() warn: impossible condition '(options[1] == (255)) => ((-128)-127 == 255)'
fs/vboxsf/super.c:391 vboxsf_parse_monolithic() warn: impossible condition '(options[2] == (254)) => ((-128)-127 == 254)'
fs/vboxsf/super.c:392 vboxsf_parse_monolithic() warn: impossible condition '(options[3] == (253)) => ((-128)-127 == 253)'

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/vboxsf/super.c