]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] fix for bidi use after free
authorDaniel Gryniewicz <dang@linuxbox.com>
Tue, 16 Sep 2014 14:41:13 +0000 (10:41 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 19 Sep 2014 12:23:33 +0000 (13:23 +0100)
commitcf339b9b000baece65abba0c09a762fa45e47613
tree83463b74b0232ec854ed7dc79341c2d3ba836265
parent2cecac0dc62e39d0e411f55d8300fc415a3ba4e0
[SCSI] fix for bidi use after free

When ending a bi-directionional SCSI request, blk_finish_request()
cleans up and frees the request, but scsi_release_bidi_buffers() tries
to indirect through the request to find it's data buffers.  This causes
a panic due to a null pointer dereference.

Move the call to scsi_release_bidi_buffers() before the call to
blk_finish_request().

Signed-off-by: Daniel Gryniewicz <dang@linuxbox.com>
Reviewed-by: Webb Scales <webbnh@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_lib.c