Re: [PATCH] blk-throttle: fix race between submitter and throttler thread
From: Tejun Heo
Date: Thu May 20 2021 - 13:07:22 EST
Hello, Dmitry.
On Thu, May 20, 2021 at 08:00:51PM +0300, Dmitry Monakhov wrote:
> >> + BUG_ON(!bio_flagged(parent, BIO_CHAIN));
> >
> > Let's do WARN_ON_ONCE().
> If we hit this point when this mean that ->bio_end_io will be called for parent bio.
> Which likely result in use-after-free for that bio and silent data corruption for bio's pages
> So IMHO BUG_ON is more appropriate here. What do you think?
I see. That makes sense. Can you add a comment explaining the above?
Thanks.
--
tejun