提交 d8a6e505 编写于 作者: D David Disseldorp 提交者: Steve French

cifs: fix CIFS_IOC_GET_MNT_INFO oops

An open directory may have a NULL private_data pointer prior to readdir.

Fixes: 0de1f4c6 ("Add way to query server fs info for smb3")
Cc: stable@vger.kernel.org
Signed-off-by: NDavid Disseldorp <ddiss@suse.de>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 b704e70b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册