summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2017-05-03 18:41:13 -0400
committerSteve French <smfrench@gmail.com>2017-05-03 20:32:35 -0400
commitd8a6e505d6bba2250852fbc1c1c86fe68aaf9af3 (patch)
treee360222e1765717f60f0c32474fa6ef80268d51a /fs/cifs
parentb704e70b7cf48f9b67c07d585168e102dfa30bb4 (diff)
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") Cc: stable@vger.kernel.org Signed-off-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/ioctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 4d598a71cf84..76fb0917dc8c 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -209,6 +209,8 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
209 rc = -EOPNOTSUPP; 209 rc = -EOPNOTSUPP;
210 break; 210 break;
211 case CIFS_IOC_GET_MNT_INFO: 211 case CIFS_IOC_GET_MNT_INFO:
212 if (pSMBFile == NULL)
213 break;
212 tcon = tlink_tcon(pSMBFile->tlink); 214 tcon = tlink_tcon(pSMBFile->tlink);
213 rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg); 215 rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg);
214 break; 216 break;