blk-mq: fixup "Convert to new hotplug state machine"
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 23 Sep 2016 13:02:38 +0000 (15:02 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 23 Sep 2016 15:49:32 +0000 (09:49 -0600)
The "blk_mq_queue_reinit_dead()" just cleared the cpumask instead doing
a copy. Since we might never had an online callback we could end up with
a ZERO mask which in turn leads to crash as test robot demonstarted.

Fixes: 65d5291eee66 ("blk-mq: Convert to new hotplug state machine")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c

index 65347cb7d7e1c4d3dff83132cf0f5feb660bca80..8c0f80198e5296e4fde65eec78ec271d93336372 100644 (file)
@@ -2158,7 +2158,7 @@ static void blk_mq_queue_reinit_work(void)
 
 static int blk_mq_queue_reinit_dead(unsigned int cpu)
 {
-       cpumask_clear_cpu(cpu, &cpuhp_online_new);
+       cpumask_copy(&cpuhp_online_new, cpu_online_mask);
        blk_mq_queue_reinit_work();
        return 0;
 }