linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix a race condition triggered by submit_bio()
@ 2019-07-30 18:36 Bart Van Assche
  2019-07-30 18:36 ` [PATCH v2 1/2] block: Verify whether blk_queue_enter() is used when necessary Bart Van Assche
  2019-07-30 18:36 ` [PATCH v2 2/2] block: Fix a race condition in submit_bio() Bart Van Assche
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2019-07-30 18:36 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche

Hi Jens,

One of the consequences of the switch to blk-mq is that generic_make_request()
calls, a function called by submit_bio(), must be protected by a
blk_queue_enter() / blk_queue_exit() pair to avoid that the block-cgroup
functions called by generic_make_request() trigger a race condition. This patch
series makes the kernel report a warning if that race condition is hit and also
adds the necessary protection in submit_bio(). Please consider these patches
for kernel v5.4.

Thanks,

Bart.

Changes compared to v1:
- Use the full syzbot ID in patch 2/2 instead of abbreviating it.

Bart Van Assche (2):
  block: Verify whether blk_queue_enter() is used when necessary
  block: Fix a race condition in submit_bio()

 block/blk-cgroup.c         |  2 ++
 block/blk-core.c           | 34 +++++++++++++++++++++++++++++++++-
 include/linux/blk-cgroup.h |  2 ++
 include/linux/blkdev.h     |  8 ++++++++
 4 files changed, 45 insertions(+), 1 deletion(-)

-- 
2.22.0.709.g102302147b-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-30 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 18:36 [PATCH v2 0/2] Fix a race condition triggered by submit_bio() Bart Van Assche
2019-07-30 18:36 ` [PATCH v2 1/2] block: Verify whether blk_queue_enter() is used when necessary Bart Van Assche
2019-07-30 18:36 ` [PATCH v2 2/2] block: Fix a race condition in submit_bio() Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).