xprtrdma: Fix use-after-free in rpcrdma_post_recvs
authorChuck Lever <chuck.lever@oracle.com>
Wed, 19 Jun 2019 14:32:38 +0000 (10:32 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 2 Jul 2019 20:29:21 +0000 (16:29 -0400)
commit2d0abe36cf13fb7b577949fd1539326adddcc9bc
tree96c99216ecec578b13c1bc2e388d47c0b36576d4
parent10694ac92c063681246a360a45019f05855ab755
xprtrdma: Fix use-after-free in rpcrdma_post_recvs

Dereference wr->next /before/ the memory backing wr has been
released. This issue was found by code inspection. It is not
expected to be a significant problem because it is in an error
path that is almost never executed.

Fixes: 7c8d9e7c8863 ("xprtrdma: Move Receive posting to ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c