From 4f2ade37a30469626989dbd873b80857711b3671 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 24 Mar 2004 05:44:16 -0800 Subject: [PATCH] [PATCH] ppc64: fix mount compat translation bug 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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index b19b657831dce..64344b1d24df5 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c @@ -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; -- 2.53.0