
From: Anton Blanchard <anton@samba.org>

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.


---

 25-akpm/arch/ppc64/kernel/sys_ppc32.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff -puN arch/ppc64/kernel/sys_ppc32.c~ppc64-mount-fix arch/ppc64/kernel/sys_ppc32.c
--- 25/arch/ppc64/kernel/sys_ppc32.c~ppc64-mount-fix	2004-03-25 00:39:54.657461136 -0800
+++ 25-akpm/arch/ppc64/kernel/sys_ppc32.c	2004-03-25 00:39:54.662460376 -0800
@@ -405,14 +405,13 @@ asmlinkage long sys32_mount(char *dev_na
 	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;

_
