]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: verify that tcon is valid before dereference in cifs_kill_sb
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 13 Apr 2022 00:02:17 +0000 (10:02 +1000)
committerSteve French <stfrench@microsoft.com>
Thu, 14 Apr 2022 05:07:36 +0000 (00:07 -0500)
commitdb298da49e9b770705963c1df95f00be6916869e
tree7f5d022280835e26823cc8171c38685a7d5395fc
parent986528826b44f9fa5f9779185ccd918a23c1e44a
cifs: verify that tcon is valid before dereference in cifs_kill_sb

On umount, cifs_sb->tlink_tree might contain entries that do not represent
a valid tcon.
Check the tcon for error before we dereference it.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Reported-by: Xiaoli Feng <xifeng@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c