cifs: fix CIFS_IOC_GET_MNT_INFO oops
Subsystems (3)
PATCH 1/1 cifs: fix CIFS_IOC_GET_MNT_INFO oops
An open directory may have a NULL private_data pointer prior to readdir.
Fixes 0de1f4c6f6c0 ("Add way to query server fs info for smb3")
Signed-off-by David Disseldorp <[email protected]>
--- fs/cifs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+)
fs/cifs/ioctl.c +2 -0
@@ -209,6 +209,8 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) rc = -EOPNOTSUPP ;break ;case CIFS_IOC_GET_MNT_INFO : +if (pSMBFile ==NULL ) +break ; tcon =tlink_tcon (pSMBFile->tlink); rc =smb_mnt_get_fsinfo (xid, tcon, (void __user *)arg);break ;
Signature · 1 line
2.12.0
Steve French
Appliedmerged into cifs-2.6.git thx
Quoted 29 lines · David Disseldorp
An open directory may have a NULL
private_datapointer prior to readdir.Fixes 0de1f4c6f6c0 ("Add way to query server fs info for smb3")Signed-off-by David Disseldorp <[email protected]>--- fs/cifs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+)fs/cifs/ioctl.c +2
-1@@ -209,6 +209,8 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) rc = -EOPNOTSUPP ;break ;case CIFS_IOC_GET_MNT_INFO : +if (pSMBFile ==NULL ) +break ; tcon =tlink_tcon (pSMBFile->tlink); rc =smb_mnt_get_fsinfo (xid, tcon, (void __user *)arg);break ; --2.12.0
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Thanks, Steve