Re: [PATCH] block: fix memleak of bio integrity data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/12/2019 02:09, Ming Lei wrote:
From: Justin Tee <justin.tee@xxxxxxxxxxxx>

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")
Cc: Justin Tee <justin.tee@xxxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>

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

written


Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>

Don't forget the author SoB...

---
  block/bio-integrity.c | 2 +-



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux