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>
Mon, 1 Oct 2012 03:36:47 +0000 (20:36 -0700)
commit9b796d06d5d1b1e85ae2316a283ea11dd739ef96
treebc3a48847b26bc54d3d87f0ae6d264a0ed4ff681
parent979570e02981d4a8fc20b3cc8fd651856c98ee9d
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