lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <x494ms3evzy.fsf@segfault.boston.devel.redhat.com>
Date:	Tue, 06 Jan 2015 11:04:17 -0500
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Jens Axboe <jaxboe@...com>, Shaohua Li <shli@...nel.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [patch] blk-mq: suppress a warning

Jens,

Is there any reason the following patch from Shaohua didn't go in?  We
are hitting this WARN_ON during hotplug testing, and this patch fixes
the problem.  The previous posting is located here:

http://linux-kernel.2935.n7.nabble.com/patch-blk-mq-suppress-a-warning-td895340.html

Cheers,
Jeff

From: Shaohua Li <shli@...nel.org>

The warning is hit when cpu hotplug is running. After scheduler puts a cpu
online and before blk-mq mapping reinit, a task can queue a request and run the
queue. At that time the cpu isn't in hctx->cpumask, but the cpu is mapped into
hctx 0. When the race happens, hctx->cpumask doesn't set the cpu and
ctx->index_hw/hctx->nr_ctx isn't correct, but it doesn't cause any problem. So
just suppress the warning here.

Signed-off-by: Shaohua Li <shli@...nel.org>
Signed-off-by: Jeff Moyer <jmoyer@...hat.com>

diff --git a/block/blk-mq.c b/block/blk-mq.c
index da1ab56..491beb7 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -702,7 +702,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
 	struct list_head *dptr;
 	int queued;
 
-	WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask));
+	WARN_ON(q->mq_ops->map_queue(q, raw_smp_processor_id()) != hctx);
 
 	if (unlikely(test_bit(BLK_MQ_S_STOPPED, &hctx->state)))
 		return;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ