Skip to content

Commit 9d682ea

Browse files
jwrdegoedeAl Viro
authored andcommitted
vboxsf: Fix the check for the old binary mount-arguments struct
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>
1 parent 9123e3a commit 9d682ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/vboxsf/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static int vboxsf_setup(void)
384384

385385
static int vboxsf_parse_monolithic(struct fs_context *fc, void *data)
386386
{
387-
char *options = data;
387+
unsigned char *options = data;
388388

389389
if (options && options[0] == VBSF_MOUNT_SIGNATURE_BYTE_0 &&
390390
options[1] == VBSF_MOUNT_SIGNATURE_BYTE_1 &&

0 commit comments

Comments
 (0)