mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH] blk-throttle: fix race between submitter and throttler thread
Date: Thu, 20 May 2021 13:07:17 -0400	[thread overview]
Message-ID: <YKaXRaJJOeOgMaGq@slm.duckdns.org> (raw)
In-Reply-To: <1394051621530051@iva4-92c901fae84c.qloud-c.yandex.net>

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

      reply	other threads:[~2021-05-20 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  8:28 Dmitry Monakhov
2021-05-20 15:00 ` Tejun Heo
2021-05-20 17:00   ` Dmitry Monakhov
2021-05-20 17:07     ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKaXRaJJOeOgMaGq@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=dmtrmonakhov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®