]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 8 Oct 2012 15:01:41 +0000 (08:01 -0700)
commitc00570e24c23ac16cf7ab5cb8def8514daa97dcc
tree19c574b48461e923a66da249021a099160101d20
parentafb4a5c7863bc076cb047ea669c4ddf00b75ab75
IB/srp: Fix use-after-free in srp_reset_req()

commit 9b796d06d5d1b1e85ae2316a283ea11dd739ef96 upstream.

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>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srp/ib_srp.c