From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451AbbDUCAb (ORCPT ); Mon, 20 Apr 2015 22:00:31 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:36013 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbbDUCA3 (ORCPT ); Mon, 20 Apr 2015 22:00:29 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: Christoph Hellwig , Al Viro , Maxim Patlasov Subject: [PATCH v1 0/2] blk-mq: fix oops caused by CPU hotplug Date: Tue, 21 Apr 2015 10:00:18 +0800 Message-Id: <1429581620-27747-1-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guys, Dongsu Park reported[1] that kernel oops can be triggered easily by CPU plug when there is pending I/O on virtio-scsi. Turns out two problems exist in blk-mq core code and both can trigger oops by CPU plug: - timeout handling vs CPU hotplug, especially unmapped hw queue tags is still touched by timeout handler - in case of shared tags, there is one bug about setting and checking hctx->tags during CPU hotplug The two patches fix the two problem, and Dongsu has verified that the oops is fixed with the two patches too. [1], http://marc.info/?t=142926389200008&r=1&w=2 V1: - update comment - moving tags allocation in blk_mq_map_swqueue() because unmapped hw queue can be remapped after CPU topo is changed block/blk-mq.c | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) Thanks, Ming Lei