]> 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)
commit7cd7eeadec13169987c63a23b8db11fbb6ac96e9
treee3766df6003a1b9f6e2084bc2266a6cafcd2e5cf
parent035e8de92482199cf36821bb1f132a11db1a96c9
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 835b1048d8e51eed3f953175c0b89e053f3b2467
("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