Justin Tee ece841abbe block: fix memleak of bio integrity data
7c20f11680a4 ("bio-integrity: stop abusing bi_end_io") moves
bio_integrity_free from bio_uninit() to bio_integrity_verify_fn()
and bio_endio(). This way looks wrong because bio may be freed
without calling bio_endio(), for example, blk_rq_unprep_clone() is
called from dm_mq_queue_rq() when the underlying queue of dm-mpath
is busy.

So memory leak of bio integrity data is caused by commit 7c20f11680a4.

Fixes this issue by re-adding bio_integrity_free() to bio_uninit().

Fixes: 7c20f11680a4 ("bio-integrity: stop abusing bi_end_io")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by Justin Tee <justin.tee@broadcom.com>

Add commit log, and simplify/fix the original patch wroten by Justin.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-05 11:38:36 -07:00
..
2019-11-25 10:59:41 -08:00
2019-12-05 11:38:36 -07:00
2019-07-09 10:45:06 -07:00
2019-10-07 08:31:59 -06:00
2019-09-19 13:27:23 -07:00
2019-10-07 21:19:10 -06:00
2019-12-05 11:38:36 -07:00
2019-12-03 08:51:24 -07:00
2019-07-15 09:20:27 -03:00
2019-10-07 08:31:59 -06:00