]> git.baikalelectronics.ru Git - kernel.git/commit
block: WARN in __blk_put_request() for potential bio leak
authorBoaz Harrosh <bharrosh@panasas.com>
Tue, 24 Mar 2009 11:35:07 +0000 (12:35 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 26 Mar 2009 10:01:23 +0000 (11:01 +0100)
commita46efd97d299efcc3e7b210a115b80e14b037f20
tree018d3ab9fa0d6e2bcd739483ac2693f6f71db96b
parent91abf0790832310fdb45ed4bddbde9fe7f8a5ce7
block: WARN in __blk_put_request() for potential bio leak

Put a WARN_ON in __blk_put_request if it is about to
leak bio(s). This is a serious bug that can happen in error
handling code paths.

For this to work I have fixed a couple of places in block/ where
request->bio != NULL ownership was not honored. And a small cleanup
at sg_io() while at it.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c
block/blk-merge.c
block/scsi_ioctl.c