[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171218152912.457967632@linuxfoundation.org>
Date: Mon, 18 Dec 2017 16:47:52 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Yi Zhang <yizhan@...hat.com>,
Sagi Grimberg <sagi@...mberg.me>, Jens Axboe <axboe@...com>,
Sasha Levin <alexander.levin@...izon.com>
Subject: [PATCH 4.9 049/177] blk-mq: Fix tagset reinit in the presence of cpu hot-unplug
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sagi Grimberg <sagi@...mberg.me>
[ Upstream commit 0067d4b020ea07a58540acb2c5fcd3364bf326e0 ]
In case cpu was unplugged, we need to make sure not to assume
that the tags for that cpu are still allocated. so check
for null tags when reinitializing a tagset.
Reported-by: Yi Zhang <yizhan@...hat.com>
Signed-off-by: Sagi Grimberg <sagi@...mberg.me>
Signed-off-by: Jens Axboe <axboe@...com>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
block/blk-mq-tag.c | 3 +++
1 file changed, 3 insertions(+)
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -311,6 +311,9 @@ int blk_mq_reinit_tagset(struct blk_mq_t
for (i = 0; i < set->nr_hw_queues; i++) {
struct blk_mq_tags *tags = set->tags[i];
+ if (!tags)
+ continue;
+
for (j = 0; j < tags->nr_tags; j++) {
if (!tags->rqs[j])
continue;
Powered by blists - more mailing lists