Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2086779yba; Fri, 19 Apr 2019 11:52:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxulMP7aYCOxGONd5AKZ1qadwaemZssJLgLDeTNrQSfCFx7ZLpC4pv7vo9MTu71jgiKUqTh X-Received: by 2002:a63:1d4f:: with SMTP id d15mr5174945pgm.347.1555699952351; Fri, 19 Apr 2019 11:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555699952; cv=none; d=google.com; s=arc-20160816; b=prZnvA++lRqpebn7QbUdUfpDpxI058Cawz8o0PvddX5dhUOj6YUwYVMIyf/mvFTq4k SHoylHhnfXBje7KFNX4CERyi4M6He/Yv4t8AwxQY68p22PHg40JutH0deb6d4we15cJc 1FQfC3NSQEutNnnO8S7Ohy9skCCUn41UI29bYUoVupu1duMD6Xh6lEdVRk/tdNQ7nZHm Bri7fMpVCIAKIwoA2EcGSKwzBaXRA934rfqnBrUKzhL6sHx2GRL9qDbAe0dDPu4L7aY7 QZIJ6Pn/UbheJreIeC15CDeT/e9Npq2scSj7HHwNqBfDe6DN8okXw4yZl/cIoIpqxedp Nzlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:msscp.transfermailtomossagent :mime-version:content-transfer-encoding:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=pPkA9ij8PvMrQYa+Gj7p0WarVcBDGfygyLIkZY8RDcQ=; b=RD8rFrf/UatKD8VeUR+AtSc6EHJ2p3CCEJn5fgRTwRDn/d35kJUHzCBmvPlQIgBtFC bmVNJxuVqs6zCXWGJHGRLRQAmmVBLjPAtMcHTSDV3xYw5sFtugWd3TS79rQovpU8uwl4 cDkcSaK9QXBGfv5lf4DcVM9UMBEKW8u02vm1hIXGOLM3cpfML9ZcdSgZa+MUw00k5aau qfN2XEwHc6ALH/wZBlLLNffn9UngBNFC0I+v9un74+OAtc4F/3KvrGFG8snlwmFVjodo +I8Sr4Zt7MEf87jrECKHy0hm0rV/r/lmmFqgA16OcYxiR7hgpmheYC6yOlmYjLYR5GpH tUDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j73si5245527pge.370.2019.04.19.11.52.17; Fri, 19 Apr 2019 11:52:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728188AbfDSSvH convert rfc822-to-8bit (ORCPT + 99 others); Fri, 19 Apr 2019 14:51:07 -0400 Received: from mo-csw-fb1514.securemx.jp ([210.130.202.170]:33634 "EHLO mo-csw-fb.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfDSSvG (ORCPT ); Fri, 19 Apr 2019 14:51:06 -0400 X-Greylist: delayed 1505 seconds by postgrey-1.27 at vger.kernel.org; Fri, 19 Apr 2019 14:51:04 EDT Received: by mo-csw-fb.securemx.jp (mx-mo-csw-fb1514) id x3J7DcZ8022345; Fri, 19 Apr 2019 16:13:38 +0900 Received: by mo-csw.securemx.jp (mx-mo-csw1515) id x3J7DDJw006435; Fri, 19 Apr 2019 16:13:13 +0900 X-Iguazu-Qid: 34trkhapAUMCS5adZx X-Iguazu-QSIG: v=2; s=0; t=1555657993; q=34trkhapAUMCS5adZx; m=9IbhJiAyufywHvcRRWat0JUJWuATschBB1EP0iNMuxg= Received: from imx12.toshiba.co.jp (imx12.toshiba.co.jp [61.202.160.132]) by relay.securemx.jp (mx-mr1512) id x3J7DAph027499; Fri, 19 Apr 2019 16:13:11 +0900 Received: from enc02.toshiba.co.jp ([61.202.160.51]) by imx12.toshiba.co.jp with ESMTP id x3J7DA4I000172; Fri, 19 Apr 2019 16:13:10 +0900 (JST) Received: from hop101.toshiba.co.jp ([133.199.85.107]) by enc02.toshiba.co.jp with ESMTP id x3J7D9OG000907; Fri, 19 Apr 2019 16:13:10 +0900 From: To: , CC: , , , Subject: Re: [PATCH 5.0 19/93] paride/pcd: cleanup queues when detection fails Thread-Topic: [PATCH 5.0 19/93] paride/pcd: cleanup queues when detection fails Thread-Index: AQHU9hNHSVpYSssU/UquB1j4yEaZnqZC5Hpr Date: Fri, 19 Apr 2019 07:13:07 +0000 X-TSB-HOP: ON Message-ID: References: <20190418160436.781762249@linuxfoundation.org>,<20190418160438.746819159@linuxfoundation.org> In-Reply-To: <20190418160438.746819159@linuxfoundation.org> Accept-Language: ja-JP, en-US Content-Language: ja-JP authentication-results: spf=none (sender IP is ) smtp.mailfrom=nobuhiro1.iwamatsu@toshiba.co.jp; x-originating-ip: [103.91.184.5] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7d2f3522-75ae-4413-2f60-08d6c4967935 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020);SRVR:TYAPR01MB2560; x-ms-traffictypediagnostic: TYAPR01MB2560: x-microsoft-antispam-prvs: x-forefront-prvs: 0012E6D357 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(396003)(376002)(39860400002)(136003)(189003)(199004)(486006)(476003)(2906002)(11346002)(97736004)(99286004)(446003)(6436002)(316002)(74316002)(5660300002)(52536014)(3846002)(6116002)(33656002)(2501003)(74482002)(54906003)(229853002)(110136005)(55016002)(6246003)(81156014)(81166006)(8676002)(66066001)(25786009)(9686003)(53936002)(7736002)(305945005)(14454004)(7696005)(186003)(68736007)(26005)(6506007)(4326008)(102836004)(76176011)(8936002)(478600001)(46636005)(66476007)(14444005)(256004)(86362001)(71200400001)(71190400001)(66446008)(64756008)(66556008)(66946007)(73956011)(76116006);DIR:OUT;SFP:1101;SCL:1;SRVR:TYAPR01MB2560;H:TYAPR01MB4189.jpnprd01.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: toshiba.co.jp does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JIBNw32+sQWxlqs4JDEHSS8uGNgNZcvgN5050hxzzwU7sEKzKHU0RVn5EeYVEBQxZHkHTrDLjsAaPWwXExzUZ2TkHWxQ2mnAQmlOuj5jq9BDnyHdbS6DjvOEfF1R4k44nc/ZZjo43QmODG1O8Hpl2Of5g45lHfeOs3T/nX2pCKqfB2If5Udfg24eYJfXWyvgV7Mb5F47oy87RAHecdyNw7La3+6EvvfBRr5yHPNQISIB03hA1Be+IJ4uodvcivhlQHOIaX7tZKiKdleXh1TVJWjm6XufYKHX+aaySNzlYb3jLl0K49Y/ldaVIeI3fORrebpjjZe1xNnsktSVO5GBOAyy0+rOT4Kvy8WgN6g97Yy8OYNM0WZScYjYq+G6Xq0+7DUmR+oweewSrmaIFkWVb5gESPDJcI2hBe/SgnUyR+U= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7d2f3522-75ae-4413-2f60-08d6c4967935 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2019 07:13:07.6390 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f109924e-fb71-4ba0-b2cc-65dcdf6fbe4f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2560 MSSCP.TransferMailToMossAgent: 103 X-OriginatorOrg: toshiba.co.jp Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > [ Upstream commit 81b74ac68c28fddb3589ad5d4d5e587baf4bb781 ] > > The driver allocates queues for all the units it potentially > supports. But if we fail to detect any drives, then we fail > loading the module without cleaning up those queues. This is > now evident with the switch to blk-mq, though the bug has > been there forever as far as I can tell. > > Also fix cleanup through regular module exit. > > Reported-by: Randy Dunlap > Tested-by: Randy Dunlap > Signed-off-by: Jens Axboe > Signed-off-by: Sasha Levin This commit causes a new problem. And the commit that made the fix is f0d1762554014ce0ae347b9f0d088f2c157c8c72. I think this commit needs to be applied together. Best regards, Nobuhiro ________________________________________ 差出人: stable-owner@vger.kernel.org が Greg Kroah-Hartman の代理で送信 送信日時: 2019年4月19日 2:56 宛先: linux-kernel@vger.kernel.org CC: Greg Kroah-Hartman; stable@vger.kernel.org; Randy Dunlap; Jens Axboe; Sasha Levin 件名: [PATCH 5.0 19/93] paride/pcd: cleanup queues when detection fails [ Upstream commit 81b74ac68c28fddb3589ad5d4d5e587baf4bb781 ] The driver allocates queues for all the units it potentially supports. But if we fail to detect any drives, then we fail loading the module without cleaning up those queues. This is now evident with the switch to blk-mq, though the bug has been there forever as far as I can tell. Also fix cleanup through regular module exit. Reported-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/block/paride/pcd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 96670eefaeb2..377a694dc228 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c @@ -749,8 +749,12 @@ static int pcd_detect(void) return 0; printk("%s: No CD-ROM drive found\n", name); - for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) + for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) { + blk_cleanup_queue(cd->disk->queue); + cd->disk->queue = NULL; + blk_mq_free_tag_set(&cd->tag_set); put_disk(cd->disk); + } pi_unregister_driver(par_drv); return -1; } -- 2.19.1