mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
ksmbd: fix possible null-deref in smb_lazy_parent_lease_break_close
rcu_dereference can return NULL, so make sure we check against that. Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
c8efcc7861
commit
5fb282ba4f
|
|
@ -1143,7 +1143,7 @@ void smb_lazy_parent_lease_break_close(struct ksmbd_file *fp)
|
||||||
opinfo = rcu_dereference(fp->f_opinfo);
|
opinfo = rcu_dereference(fp->f_opinfo);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
if (!opinfo->is_lease || opinfo->o_lease->version != 2)
|
if (!opinfo || !opinfo->is_lease || opinfo->o_lease->version != 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p_ci = ksmbd_inode_lookup_lock(fp->filp->f_path.dentry->d_parent);
|
p_ci = ksmbd_inode_lookup_lock(fp->filp->f_path.dentry->d_parent);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user