Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbbGBOa0 (ORCPT ); Thu, 2 Jul 2015 10:30:26 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:34110 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752873AbbGBOaV (ORCPT ); Thu, 2 Jul 2015 10:30:21 -0400 From: Akinobu Mita To: linux-kernel@vger.kernel.org Cc: Akinobu Mita , Jens Axboe , Ming Lei Subject: [PATCH v2 0/6] blk-mq: fix race conditions on cpu hotplug handling Date: Thu, 2 Jul 2015 23:29:51 +0900 Message-Id: <1435847397-724-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1442 Lines: 45 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 Cc: Ming Lei -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/