]> 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)
commitf398e229d8c84712a3bda80598f67f9bb4baa1a9
tree7f5d022280835e26823cc8171c38685a7d5395fc
parent3a4feca0ffb3f157e3dc55864f19532467ab0564
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