]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/srp: Fix use-after-free in srp_reset_req()
authorBart Van Assche <bvanassche@acm.org>
Fri, 24 Aug 2012 10:27:54 +0000 (10:27 +0000)
committerRoland Dreier <roland@purestorage.com>
Tue, 18 Sep 2012 17:44:16 +0000 (10:44 -0700)
commit60b296a01a67da823c6545d728e6eb60a2bc79f9
tree2416d63b17d906e529e0ca38f4df6396d4ec0bfc
parentfea7a08acb13524b47711625eebea40a0ede69a0
IB/srp: Fix use-after-free in srp_reset_req()

srp_free_req() uses the scsi_cmnd structure contents to unmap
buffers, so we must invoke srp_free_req() before we release
ownership of that structure.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Cc: <stable@vger.kernel.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srp/ib_srp.c