mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/6] blk-mq: fix race conditions on cpu hotplug handling
@ 2015-07-02 14:29 Akinobu Mita
  2015-07-02 14:29 ` [PATCH v2 1/6] blk-mq: fix sysfs registration/unregistration race Akinobu Mita
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Akinobu Mita @ 2015-07-02 14:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Akinobu Mita, Jens Axboe, Ming Lei

This patchset addresses several race conditions on cpu hotplug handling
for blk-mq.  All problems are reproducible by the following script.

while true; do
	echo 0 > /sys/devices/system/cpu/cpu1/online
	echo 1 > /sys/devices/system/cpu/cpu1/online
done &

while true; do
	modprobe -r null_blk
	modprobe null_blk queue_mode=2 irqmode=1
	sleep 0.1
done

* Changes from v1
- Release q->mq_map in blk_mq_release()
- Fix deadlock when reading cpu_list
- Fix race freeze and unfreeze

Akinobu Mita (6):
  blk-mq: fix sysfs registration/unregistration race
  blk-mq: Fix use after of free q->mq_map
  blk-mq: fix q->mq_usage_counter access race
  blk-mq: avoid inserting requests before establishing new mapping
  blk-mq: fix freeze queue race
  blk-mq: fix deadlock when reading cpu_list

 block/blk-core.c       |  2 ++
 block/blk-mq-cpumap.c  |  9 +++---
 block/blk-mq-sysfs.c   | 50 ++++++++++++++++++++++---------
 block/blk-mq.c         | 81 ++++++++++++++++++++++++++++++--------------------
 block/blk-mq.h         |  5 ++--
 include/linux/blkdev.h |  9 ++++++
 6 files changed, 102 insertions(+), 54 deletions(-)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <tom.leiming@gmail.com>
-- 
1.9.1


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

end of thread, other threads:[~2015-07-10  8:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-02 14:29 [PATCH v2 0/6] blk-mq: fix race conditions on cpu hotplug handling Akinobu Mita
2015-07-02 14:29 ` [PATCH v2 1/6] blk-mq: fix sysfs registration/unregistration race Akinobu Mita
2015-07-08 11:48   ` Ming Lei
2015-07-09 14:25     ` Akinobu Mita
2015-07-09 14:43       ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 2/6] blk-mq: Fix use after of free q->mq_map Akinobu Mita
2015-07-08 11:53   ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 3/6] blk-mq: fix q->mq_usage_counter access race Akinobu Mita
2015-07-08 11:53   ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 4/6] blk-mq: avoid inserting requests before establishing new mapping Akinobu Mita
2015-07-09  7:04   ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 5/6] blk-mq: fix freeze queue race Akinobu Mita
2015-07-09  6:55   ` Ming Lei
2015-07-09 21:37     ` Tejun Heo
2015-07-10  8:08       ` Ming Lei
2015-07-09 21:34   ` Tejun Heo
2015-07-02 14:29 ` [PATCH v2 6/6] blk-mq: fix deadlock when reading cpu_list Akinobu Mita

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®