]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: fix mount compat translation bug
authorAnton Blanchard <anton@samba.org>
Wed, 24 Mar 2004 13:44:16 +0000 (05:44 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 24 Mar 2004 13:44:16 +0000 (05:44 -0800)
From Dave Miller:

We weren't handling a NULL 'type' argument to mount() properly,
f.e. this happens legitimately when changing the options of an
existing mount.

arch/ppc64/kernel/sys_ppc32.c

index b19b657831dce78b46e29705620259ade28cd191..64344b1d24df537f80e6a25663668ec55b277388 100644 (file)
@@ -405,14 +405,13 @@ asmlinkage long sys32_mount(char *dev_name, char *dir_name, char *type, unsigned
        if (err)
                goto out;
 
-       if (!type_page) {
-               err = -EINVAL;
-               goto out;
+       if (type_page) {
+               is_smb = !strcmp((char *)type_page, SMBFS_NAME);
+               is_ncp = !strcmp((char *)type_page, NCPFS_NAME);
+       } else {
+               is_smb = is_ncp = 0;
        }
 
-       is_smb = !strcmp((char *)type_page, SMBFS_NAME);
-       is_ncp = !strcmp((char *)type_page, NCPFS_NAME);
-
        err = copy_mount_stuff_to_kernel((const void *)AA(data), &data_page);
        if (err)
                goto type_out;