On Wed, Dec 04, 2019 at 09:41:24PM -0800, Justin Tee wrote: > Hi Ming, > > I understand the patch, but I have a concern. > > Is it possible to come across a double-free? from bio_endio -> > bio_integrity_endio -> __bio_integrity_endio -> bio_integrity_free; And > then, resuming in bio_endio -> bio_uninit -> bio_integrity_free;. Maybe > it's even possible queue_work bio_integrity_verify_fn was scheduled and > called bio_integrity_free from there as well. So, should also remove > bio_integrity_free from bio_integrity_verify_fn and __bio_integrity_endio > routines? Yeah, double-free could be caused for READ between bio_integrity_verify_fn() and bio_uninit(). I think it is enough to remove bio_integrity_free() from both bio_integrity_verify_fn() and __bio_integrity_endio(). Will do it in V2. Thanks, Ming