Message ID | 20170531214350.31157-5-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> 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 0237A60390 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 31 May 2017 21:44:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8ED41FE85 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 31 May 2017 21:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD9D8284D5; Wed, 31 May 2017 21:44:10 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham 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 765971FE85 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 31 May 2017 21:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751004AbdEaVoK (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Wed, 31 May 2017 17:44:10 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:12642 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbdEaVoF (ORCPT <rfc822;linux-block@vger.kernel.org>); Wed, 31 May 2017 17:44:05 -0400 X-IronPort-AV: E=Sophos;i="5.39,276,1493654400"; d="scan'208";a="118869940" Received: from mail-sn1nam02lp0018.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.18]) by ob1.hgst.iphmx.com with ESMTP; 01 Jun 2017 06:02:52 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HOYXL7Ve2rMEz45c0KAFUGPhoHHMIC9XaS2tkiOdyDE=; b=BPrNENupXeGOQ+P1WfP+FhNqahivCJnBIDdQEPa+mwI2Tkr0hqYeg672jY+Jz4ce4lHi51XFE10hPhDzG0v6SvKu2+HBETdSC5/pgcmzruPN2msxvmtfqLb0fEcBlhWWd6O9PVjmF4G93slCJep8X57xQdBBIbghwQrkWGd1UJk= Received: from DM5PR04CA0045.namprd04.prod.outlook.com (10.171.152.159) by BN6PR04MB0386.namprd04.prod.outlook.com (10.173.198.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 21:43:56 +0000 Received: from CO1NAM04FT009.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::208) by DM5PR04CA0045.outlook.office365.com (2603:10b6:3:12b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 31 May 2017 21:43:55 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by CO1NAM04FT009.mail.protection.outlook.com (10.152.90.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 21:43:55 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 05.22.51736.B193F295; Wed, 31 May 2017 14:43:55 -0700 (PDT) Received: from milsmgip12.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, 31 May 2017 14:43:54 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-ba-592f391bda4f Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 8A.DD.18148.A193F295; Wed, 31 May 2017 14:43:54 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: Jens Axboe <axboe@kernel.dk> CC: <linux-block@vger.kernel.org>, Christoph Hellwig <hch@lst.de>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Omar Sandoval <osandov@fb.com> Subject: [PATCH v2 4/6] pktcdvd: Check queue type before attaching to a queue Date: Wed, 31 May 2017 14:43:48 -0700 Message-ID: <20170531214350.31157-5-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170531214350.31157-1-bart.vanassche@sandisk.com> References: <20170531214350.31157-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsXCddJ5ka60pX6kwZd5Shar7/azWaxcfZTJ Yu8tbYvD966yOLB4TGx+x+5x+Wypx+6bDWwenzfJBbBEcdmkpOZklqUW6dslcGX8ubeUqWAO Z8XNyz3sDYy32LsYOTkkBEwk1v+5DmYLCSxlklh9372LkQvI3sYo0XN3FStMUefdRhaIxGZG if9P3zGDJNgEjCS+vZ/JAmKLCChI9PxeyQZSxCwwkVFi+7Q7YG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aLl44a0pGzIdRbbt9VdiKc5I NNRiLipOBAAvYmeLuAEAAA== MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39400400002)(39860400002)(39840400002)(39410400002)(39850400002)(2980300002)(438002)(9170700003)(72206003)(478600001)(54906002)(2906002)(50226002)(38730400002)(110136004)(47776003)(5003940100001)(77096006)(53936002)(48376002)(4326008)(8936002)(8676002)(81166006)(305945005)(6666003)(189998001)(36756003)(1076002)(6916009)(5660300001)(50986999)(50466002)(76176999)(33646002)(2950100002)(106466001)(356003)(86362001)(133343001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0386; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT009; 1:9IQIyie+PL8zLAwLYo258/xfY5nOrcUt1OqTkkKTUt+nRWR4ILWK1iEdiNxpMEbNZvDStFe/gKgBV8H2/70+dISP3tDhSNh/Dk5lKNKEQw4S/CUr47BIhLFLUqwNlIYeTCgKbFSyba7CWrREW48kVNEn6cgEPzM+DLspvzXHpHrwx6B4FKYIaM4ZaUUeG44NgyhxdLWo3JQkXcbOpYt/XN+IaDf6H0+liOD01HxSnDLoIXA1Qj2IV2WcEyoB/QqffyzPQIbQGbIaHpASKHHkct7LVkUowPDVQb3B1tXO+0bx5fm4WbEtqlawFE0HPrxDr1MvSI1PiJ7ok6UYfaVBMaNUxkZt8HpUloUQmkZLqYZtok1Ej6NThqUJIAmRXpSOvzC+djzM+s5JY3t64/0wbGzcOwNDJbc+7SM7Rh9UdeeiMV3YjSS3CNxVMHPy8y/ckMVKDOG9Phg4NPAskF0sHDjpoqc0LLLuKFGvK3x9+uOz1iB5ATFfvsSrbMU++/VX4f5nkJ+CAdY5echYZkhjF+r9zI7oRiLRaKxte0bUS+Y= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0386: X-MS-Office365-Filtering-Correlation-Id: f930730a-7c88-4ea0-f6d2-08d4a86e2363 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR04MB0386; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0386; 3:he7k0XGBESequoKbzmDe0XxAyHTL48AUSk10t9gCPRbsuCJOyBLUIZifMQYlroII67TJOi1UtFcAeQfmG5t0pBeGLc7H86gAeYhhwGe9evkgG+sft2W47RzME3qr9FsMCzLe8dFvrfhtsqI2xADhhSlb7A4FQymzwCPNwG0n/ysWR4OWT8e6dLroHcOgXI1CMDSdymVyH6cSVPmwFPAC3NXe6r78txdQlKPe9O2tsJ2XaG1rNegzxjm4lEIhqGCXMXynElrktwDIHFMimt4vxaoYSP2COWlySpFYmxnoNru4arZRDpNRHtWv0DwX2uJm8oCI7Qda9QEyYDwJ4MOKcQhZCQz9I6Rz2D3+b6fDAVAmW5IYbsf7oS9Yr8NGNwSN7HQe+0ZtlhbajhC6gYRkI/8SB4/GYEArq2m+p15/tcgQKwl0NGAaatBXU+NNGAYud9iVYesreFYxHSw0m/VbOLvgC2WtVw97qrWavM38MqqwwSrZKKixcvv9Ch05CRAa X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0386; 25:wTS8fE9Xs4EyrT2kOPmqUp0fZYuwdbtax2zVSWiW7Nx7BEEksy175RNjUFb/6KoShd0g2yIXpfgg1tQIZCt4pcmqO9xuqYO7rFIvIcYwXWnRn0/089d0LTORb6+OkHkySYYltZ18FSLNawfdSlfBXxE0jJVd8glAP+VdXuXxvyEMd42/Vi+yeTmRiAqPrqQLg1G9ZX3V8/mPBdoI3nbqvNKTIYi6CaHj/IVLoo6xvrYIgyR78aV1/2+VzpmzYFvdF2p+6cjAhjjvvZUYbNXT445f5RpChGM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XJ/l1tOn X-Microsoft-Antispam-PRVS: <BN6PR04MB03861EB3C988AB7A96FB32FA81F10@BN6PR04MB0386.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(100000703073)(100105400095)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:BN6PR04MB0386; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:BN6PR04MB0386; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0386; 4:aJBNa9vdnyrLuHYQbnkc3P0J+EjeNDLdt43pFGgT2F?= =?us-ascii?Q?5SzRmYDmZuQmMm5JTVU6iEreH2mSqt7OLkmfnZxV4ctbzaawX1/ozLay4fIw?= =?us-ascii?Q?Zh4RMoqWg8y6oAZqVjUAV++KnPREjyzE/YA0WDZYpLIfOQb4EEVCHqoshfnM?= =?us-ascii?Q?dY2/bTgGU39QNGLjdx1TEntYDB0tlW3kAE94CQQrvQFN0cNcna3ReGEaowEC?= =?us-ascii?Q?6QAY4UrbhqxMk71A2UXhGuUstoHobcDBupnmbjW/qBOwk6sS4bKogq8C3mIS?= =?us-ascii?Q?2maoRkLNJGNSlMxK0Of8+Bne9XMUb0rscYUBYDFuzdddAKrHUeZCVRwkka4J?= =?us-ascii?Q?dJ3ZJ+K+Va/m0IBj0amA/T2XDa1XWKlODqJ40jGuVP6J31Fu8RrSx+g13qU3?= =?us-ascii?Q?GCxOw4kx3TvS4TZNfAS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GOjoncrpI4lEECC7u3lw+z5xCGzlcucsvl6sre5FDKFkLRTd3UfEI= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 21:43:55.6892 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR04MB0386 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On 31.05.2017 23:43, Bart Van Assche wrote: > Since the pktcdvd driver only supports request queues for which > struct scsi_request is the first member of their private request > data, refuse to register block layer queues for which struct > scsi_request is not the first member of the private data. > > References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") > Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> > Reviewed-by: Hannes Reinecke <hare@suse.com> > Reviewed-by: Christoph Hellwig <hch@lst.de> > Cc: Omar Sandoval <osandov@fb.com> > --- > drivers/block/pktcdvd.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c > index 205b865ebeb9..42e3c880a8a5 100644 > --- a/drivers/block/pktcdvd.c > +++ b/drivers/block/pktcdvd.c > @@ -2583,6 +2583,11 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) > bdev = bdget(dev); > if (!bdev) > return -ENOMEM; > + if (!blk_queue_scsi_passthrough(bdev_get_queue(bdev))) { > + WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); > + bdput(bdev); > + return -EINVAL; > + } > ret = blkdev_get(bdev, FMODE_READ | FMODE_NDELAY, NULL); > if (ret) > return ret; > This commit causes a NULL pointer dereference when adding a pktcdvd mapping. Reproducing it is simple: # pktsetup 1 /dev/cdrom Specifically, the NULL dereference happens inside bdev_get_queue(bdev), which is supposed to return bdev->bd_disk->queue, but in this case bdev->bd_disk is NULL. If I revert this commit the mapping is added correctly (tested on 4.14.10, but there haven't been any changes to pktcdvd.c and bdev_get_queue() in 4.15-rc5). Maciej
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 205b865ebeb9..42e3c880a8a5 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -2583,6 +2583,11 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) bdev = bdget(dev); if (!bdev) return -ENOMEM; + if (!blk_queue_scsi_passthrough(bdev_get_queue(bdev))) { + WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); + bdput(bdev); + return -EINVAL; + } ret = blkdev_get(bdev, FMODE_READ | FMODE_NDELAY, NULL); if (ret) return ret;