]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
smb3: Handle error case during offload read path
authorRohith Surabattula <rohiths@microsoft.com>
Thu, 29 Oct 2020 06:07:56 +0000 (06:07 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:24:34 +0000 (14:24 +0100)
commit8d29ac0b072ea8d28878345e5556c58740c76943
treeb540b6f9d80815e728155e5441e2fec6519f7552
parentf4876d453ebf0f23ef824992e10788358ab383d7
smb3: Handle error case during offload read path

BugLink: https://bugs.launchpad.net/bugs/1908562
commit 1254100030b3377e8302f9c75090ab191d73ee7c upstream.

Mid callback needs to be called only when valid data is
read into pages.

These patches address a problem found during decryption offload:
      CIFS: VFS: trying to dequeue a deleted mid
that could cause a refcount use after free:
      Workqueue: smb3decryptd smb2_decrypt_offload [cifs]

Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org> #5.4+
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
fs/cifs/smb2ops.c