From patchwork Wed Nov 8 18:23:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10048929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 29080603FF for ; Wed, 8 Nov 2017 18:25:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24E5B297E0 for ; Wed, 8 Nov 2017 18:25:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19A1C297E8; Wed, 8 Nov 2017 18:25:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF285297E0 for ; Wed, 8 Nov 2017 18:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751674AbdKHSZ0 (ORCPT ); Wed, 8 Nov 2017 13:25:26 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:15771 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbdKHSZZ (ORCPT ); Wed, 8 Nov 2017 13:25:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1510165525; x=1541701525; h=from:to:cc:subject:date:message-id:mime-version; bh=YWT75tsAeEi0e4iKzZ3+FNiQ8Wt33LXXaRHnrZEBVYs=; b=JbUQYX4Q13e1Lx6uqYz78kW8Cpyu/ICKPudGsD3c7nquTL3Mo8zP1apU zhbNv/wcIqr9cKm5BzM+9OcY4i2bHqEY/cyXkAt7ol/7GXDFi1FwKB8F3 pzhvBnPH3lF+IIRmVGg7zwYFpvMCc3wsmu/dxmp6ms1AVvrG3DiTg2Foa QOvftGQKrH4OD1qBZnlvu90+kGVvhv5iealxkiMritkUaddxWirmMImn1 sKL4PH2TN5ua82SJGL36kLST8GBpcrhIrI4sVhmPfnVgGdMK5WWy2tySN 9jwsOS/NNpLz6pIx1DenbnWuFXRSLERT4eANyeXUDRuiVFi4u17T3aOt/ w==; X-IronPort-AV: E=Sophos;i="5.44,365,1505750400"; d="scan'208";a="164405875" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Nov 2017 02:25:24 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 08 Nov 2017 10:22:49 -0800 Received: from unknown (HELO MILHUBIP03.sdcorp.global.sandisk.com) ([10.177.9.96]) by uls-op-cesaip02.wdc.com with ESMTP; 08 Nov 2017 10:25:26 -0800 Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Wed, 8 Nov 2017 10:23:49 -0800 X-AuditID: 0ab10959-0abff70000002c97-67-5a034bb194be Received: from thinkpad-bart.int.fusionio.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id BC.73.11415.1BB430A5; Wed, 8 Nov 2017 10:23:48 -0800 (PST) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , , Bart Van Assche , Hannes Reinecke , Johannes Thumshirn Subject: [PATCH] blk-mq: Avoid that request queue removal can trigger list corruption Date: Wed, 8 Nov 2017 10:23:45 -0800 Message-ID: <20171108182345.8616-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJMWRmVeSWpSXmKPExsXCtZGTTXeLN3OUQeNHKYvVd/vZLC79+cJo seDNXjaLlauPMlk87prBarH3lrZF9/UdbA7sHpfPlnrsvtnA5rF+y1UWj82nqz0+b5LzaD/Q zRTAFsVlk5Kak1mWWqRvl8CVcfL5XKaCFo6KRee+sDQwPmHrYuTgkBAwkfixTbOLkYtDSGAl o8SHmRuZuxg5OdgE9CROzdvHBGKLCChI9PxeyQZSxCxwk1Fi6opeVpCEsECoxLFLHxlBbBYB VYnV51ewgdi8AlYSGx+sB6uREJCXWPv2HuMERs4FjAyrGMVyM3OKc9MzCwwN9YoT81Iyi7P1 kvNzNzFCfB+5g/HpRPNDjEwcnFINjKe3zLjpYuEb6aK942SNyu/LZ01yHUoljtSwcP0RlhRq ee6S6u6qtiisrezWtO75rq71LQ9zUr86THvHoTzr07Kcr1EeqRNsOkW/OC4P4y778PZakVO0 RsWN5TfV1r5WcWoOu7zlrq4Tb0+vqQxnU672P+W+Ks73x9xf9rWprjw6lVv601JpJZbijERD Leai4kQAkgKiKK0BAAA= MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid that removal of a request queue sporadically triggers the following warning: list_del corruption. next->prev should be ffff8807d649b970, but was 6b6b6b6b6b6b6b6b WARNING: CPU: 3 PID: 342 at lib/list_debug.c:56 __list_del_entry_valid+0x92/0xa0 Call Trace: process_one_work+0x11b/0x660 worker_thread+0x3d/0x3b0 kthread+0x129/0x140 ret_from_fork+0x27/0x40 Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- block/blk-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-core.c b/block/blk-core.c index 25ccddd0b82a..1b80d43fcbc6 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -339,6 +339,7 @@ void blk_sync_queue(struct request_queue *q) struct blk_mq_hw_ctx *hctx; int i; + cancel_delayed_work_sync(&q->requeue_work); queue_for_each_hw_ctx(q, hctx, i) cancel_delayed_work_sync(&hctx->run_work); } else {