]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: only wake the thread for the very last PDU in a compound
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 30 Aug 2018 00:13:00 +0000 (10:13 +1000)
committerSteve French <stfrench@microsoft.com>
Tue, 2 Oct 2018 23:53:57 +0000 (18:53 -0500)
commit559e53dd06b585e21f462d2bd1c18a2d6030a52b
treee3766df6003a1b9f6e2084bc2266a6cafcd2e5cf
parent97f6a3183c52f056d32fc1e7d3924210d43b7079
cifs: only wake the thread for the very last PDU in a compound

For compounded PDUs we whould only wake the waiting thread for the
very last PDU of the compound.
We do this so that we are guaranteed that the demultiplex_thread will
not process or access any of those MIDs any more once the send/recv
thread starts processing.

Else there is a race where at the end of the send/recv processing we
will try to delete all the mids of the compound. If the multiplex
thread still has other mids to process at this point for this compound
this can lead to an oops.

Needed to fix recent commit:
commit d5f1508719f03265ef8abbd416bc2ac057894679
("cifs: update smb2_queryfs() to use compounding")

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/transport.c