]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Do not leak EDEADLK to dgetents64 for STATUS_USER_SESSION_DELETED
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 25 Aug 2021 11:16:56 +0000 (21:16 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 25 Aug 2021 21:08:38 +0000 (16:08 -0500)
commit3be7efff605638c1cf0c6a74fbb3b5f8c0115cd3
tree46c557393299f2d0a2ec1e534de27240fa517e2e
parent5b6fc68582872f5a842fdf42421b8ee098c8b009
cifs: Do not leak EDEADLK to dgetents64 for STATUS_USER_SESSION_DELETED

RHBZ: 1994393

If we hit a STATUS_USER_SESSION_DELETED for the Create part in the
Create/QueryDirectory compound that starts a directory scan
we will leak EDEADLK back to userspace and surprise glibc and the application.

Pick this up initiate_cifs_search() and retry a small number of tries before we
return an error to userspace.

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