mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
cifs: fix CIFS_IOC_GET_MNT_INFO oops
An open directory may have a NULL private_data pointer prior to readdir.
Fixes: 0de1f4c6f6
("Add way to query server fs info for smb3")
Cc: stable@vger.kernel.org
Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
parent
b704e70b7c
commit
d8a6e505d6
@ -209,6 +209,8 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
|
|||||||
rc = -EOPNOTSUPP;
|
rc = -EOPNOTSUPP;
|
||||||
break;
|
break;
|
||||||
case CIFS_IOC_GET_MNT_INFO:
|
case CIFS_IOC_GET_MNT_INFO:
|
||||||
|
if (pSMBFile == NULL)
|
||||||
|
break;
|
||||||
tcon = tlink_tcon(pSMBFile->tlink);
|
tcon = tlink_tcon(pSMBFile->tlink);
|
||||||
rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg);
|
rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user