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)
commit3998f0b8bc49ec784990971dc1f16bf367b19078
tree46c557393299f2d0a2ec1e534de27240fa517e2e
parent332c404a55ef3b39837e958284275622a2a4849d
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