From patchwork Thu May 25 18:43:13 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: 9748905 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 7C60F60209 for ; Thu, 25 May 2017 18:43:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 732CB2679B for ; Thu, 25 May 2017 18:43:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67E142836D; Thu, 25 May 2017 18:43:41 +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 AEEC92679B for ; Thu, 25 May 2017 18:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036484AbdEYSnk (ORCPT ); Thu, 25 May 2017 14:43:40 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:61216 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036474AbdEYSng (ORCPT ); Thu, 25 May 2017 14:43:36 -0400 X-IronPort-AV: E=Sophos;i="5.38,393,1491235200"; d="scan'208";a="21570876" Received: from mail-by2nam03lp0055.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.55]) by ob1.hgst.iphmx.com with ESMTP; 26 May 2017 02:43:34 +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=sFvuH9YaCjyejMKWoIva/0zLFth2VISs/91GWvPPXGU=; b=jxCB4JUt9+af8lN8uQLvHfdbMs2lvfsBjvRtJyI5wdN3qGlKUehAf51E83pAfXa4kncIxX1wPeTrlke516yjboOCShjWnH/hRpLU56rzMYqFWZ5FGBqYQl6VbtE5n/+ESROR9+1SgJaflLJLJcHg2FcWYNDeRXM9eB9gZ8qA2gs= Received: from MWHPR04CA0029.namprd04.prod.outlook.com (10.172.163.15) by MWHPR04MB0513.namprd04.prod.outlook.com (10.173.49.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Thu, 25 May 2017 18:43:32 +0000 Received: from CO1NAM04FT004.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::202) by MWHPR04CA0029.outlook.office365.com (2603:10b6:300:ee::15) 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; Thu, 25 May 2017 18:43:32 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.com; 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 CO1NAM04FT004.mail.protection.outlook.com (10.152.90.121) 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; Thu, 25 May 2017 18:43:31 +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 95.BC.45291.2D527295; Thu, 25 May 2017 11:43:31 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 25 May 2017 11:43:27 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-12-592725d24548 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 0A.E8.11415.FC527295; Thu, 25 May 2017 11:43:27 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Omar Sandoval Subject: [PATCH 05/19] cdrom: Check private request size before attaching to a queue Date: Thu, 25 May 2017 11:43:13 -0700 Message-ID: <20170525184327.23570-6-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170525184327.23570-1-bart.vanassche@sandisk.com> References: <20170525184327.23570-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRmVeSWpSXmKPExsXCddJ5ke5lVfVIgzmzmS1W3+1ns1i5+iiT xd5b2haH711lcWDxmNj8jt3j8tlSj903G9g8Pm+SC2CJ4rJJSc3JLEst0rdL4Mo4+Tmx4BNH xfWefvYGxq3sXYwcHBICJhI3nth2MXJxCAksZZL4/O4FE4Szg1Hi4+b3QEWcYEWnvjZAJTYz Ssx8/poZJMEmYCTx7f1MFhBbREBBouf3SjaQImaBiYwS26fdAesWFgiR+L//DxuIzSKgKnH+ wV+wOK+AvcSfd5uZIDbIS5zdshNsKKeAg8SXqRfZQM4TAqo5ccMRZKaEQBOrxMLOk1C9ghIn Zz4BW8wsICFx8MULsF4hAXWJk0vmM01gFJqFpGwWkrIFjEyrGMVyM3OKc9NTCwxN9YoT81Iy i7P1kvNzNzFCgjpzB+PdJ96HGAU4GJV4eDkeqkUKsSaWFVfmHmKU4GBWEuFVVlSPFOJNSays Si3Kjy8qzUktPsQozcGiJM57TmZqhJBAemJJanZqakFqEUyWiYNTqoHR44jM9eDafnWj5oW7 LVynVHz58k9KYM4SgQuHhSRlIlas5JG+cn9V2eSjm5vLir2SfGdW/IkKUJn3kO9guc1WhnM6 v5e1FrSZndzXpXjy9vwHJ6/8unK2qcJyo1biscLCuqKivBmBb5RSwjrYtxf3OB7kXc956vFp DqcLZ6Q8yk+z7l9wSsNYiaU4I9FQi7moOBEAYL4RB2YCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEJMWRmVeSWpSXmKPExsXCtZEjRfe8qnqkwevTRhar7/azWRz82cZo sXL1USaLvbe0LQ7fu8riwOoxsfkdu8fls6Ueu282sHlMW3OeyePzJrkA1igum5TUnMyy1CJ9 uwSujJOfEws+cVRc7+lnb2Dcyt7FyMkhIWAiceprAxOILSSwkVHi0/x4EJtNwEji2/uZLCC2 iICCRM/vlWxdjFwczAKTGSV2v7gC1iwsECLxf/8fNhCbRUBV4vyDv2BxXgF7iXVbn0MtkJc4 u2UnM4jNKeAg8WXqRaB6DqBl9hInbjhOYORewMiwilEsNzOnODc9s8DQUK84MS8lszhbLzk/ dxMjOBQ4I3cwPp1ofoiRiYNTqoHxcNG5dYWbAoMlsoTVGguyt3Z82cFfxDl5c9HHPd7aUXdn fnlxhPlg4IvcV0y8H5L3Pv36+tLSzovSfiszzj7mzViVsfJyo4cLy/07/nqXbqXlaoeI8k5e cj02ps5/y8/HF4pmf1Sz+jDBct62+EDLK4t4/A89PbF8SuCFlh4n5UlSx4qXzj5QoMRSnJFo qMVcVJwIAJrRrJG1AQAA MIME-Version: 1.0 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)(39850400002)(39450400003)(39840400002)(39860400002)(39400400002)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(305945005)(4326008)(189998001)(47776003)(2906002)(5003940100001)(77096006)(478600001)(54906002)(36756003)(72206003)(53936002)(50466002)(33646002)(76176999)(38730400002)(110136004)(106466001)(86362001)(5660300001)(356003)(8936002)(2950100002)(1076002)(6916009)(50986999)(50226002)(6666003)(81166006)(8676002)(48376002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0513; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT004; 1:2WcvHZ83fKm7vV50yJjk4xvwUcjTETswgQQDsM2OpNemDW5RAyzrS+0OItzz/3gQ4y2zV5At+ATLVx2/LfT46fL8ekX8MCtZUqX2/D4j6/HoTSbFDe7c61mu+ymu03e41RIW8a2IglE0Si6Dkd3f7Wjj28JK6ipRib1QtwV51Wnl53gWOuB0Sbap43/Rj4em3pYgj5CJME+XX08Kjr2lahe2w7gq8JUZx5AK60C6U2XZSWwNT9PLXFTIVnv4LuzsaoAh5zshWvgCK59Nog9EeOPFt9b6XKGHGSPXXcF0VRZSVqKgh9W+kM6htYQ3ngkzbNkrBZb2lQAJ9/n6UMfmSsjp+eo/+x1pd5HwNezlvJ9Cn7LaeI6QorC2ZoikGvcn6FeA8zgTajQwFiBk2Cbsx8Bq+6QeoeqXr6mLVUoWRazGoNvDkEwC9EeOVRNNntiiCDDlOZhayzImGu02RsdkOgTu1KjXcnHW00snRjmVOqjJgyH09us9CYYOzmSyc7rvifq7gmCSzcrepIv1KYFlXcVgq9qE/kz8Gk7GWZkyndU= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0513: X-MS-Office365-Filtering-Correlation-Id: ff4cf600-0f0f-42f4-5b36-08d4a39df178 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702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+9Drkpg3ksjyzIiad8xqUO7FKsnnYRrAfnPvwkwPBKn10=; 31:6fcgJXiN/sIxYAtSHaosgVsS8ArwLeVn9chY8bhhSD634VbsxyQ1QRrb93XCQdjEi6DDybbZuNCQt9ZOx4eo/XpWeeMnIY2Kh5N7pBH5xgHK9xVC5fwBxsPjhkGhqzTahdVPY9DqfJszfgW8ze4OuXlECYqIrI4k1IJ7FW2vIDHAnTP60ttL5pRHsssN/MjfjjchhhQX2IRO/p3w3Dq+CXSpZIrcfdZws18IN7CxVOPYcox6DAtSLiaz33l+QH0eZKd9EjmNgnw6dnjxbO1/4Q== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 20:LihWZGxXQKCOm+0PRdcSbhQmkSb+6ltFcv/yUDP82b5fMTBVVGU7RmapUpyjgSyhDI7PgxjCetDl/ZnsqxZENcDrRjZQHk7HlHB0w6cNQwa7EINcDwFswQLrE+mYS8tNcDhiuZ/kl4cWOwXvInC6FyaoNj7F1eSDcwW9mZqyJ+pTSqdJlQ2gmkFNOyQMuLHxJxqEuC/P/VpwYohFiqjotlhCuAcHTMv7oM2xEpthk0jaxx+nl3t0wpXClW8MQF6qN7LKpYAJ2ZlOR8xbR6Uo78U0kBla2X3TqMN2bG+aEo8ySXSATvzifb6lymQKu/JcYxiBqoZ1MWQkbuSvU3O5vCKkir8/1kUq5T41Oed5isOEhKSekt3mqACbfb7fnKEYfw3AJhXroz+Vz9K3zcvAg2PDV6vr6SZMf+7IEzPYVFIcW+xUtGaplTrWj+sdbA1GktH7nlv3AHDRyXjH96onBdbLxGFCdfEOg5a2zjsBHwEjWVzqemWLk2CB8lt15hA4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(5005006)(8121501046)(13018025)(3002001)(93006095)(93004095)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123558100)(6072148); SRVR:MWHPR04MB0513; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0513; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0513; 4:ohNdkrjL1WZVUbEmiy4BFYE2kMt2rTjsnUur57mi4n?= =?us-ascii?Q?d3lFjqgs3Gkg9DCxT3Rzcsq8U3jTc+WT+W3VnDTvuC7Qid+/80pCEYI9MfBc?= =?us-ascii?Q?k8pcUqToQxYSI0oqA4xBnyJM9lCPIHEh/2YqevrTzLn80UCHs04R6wwGQczG?= =?us-ascii?Q?XGcbovSxLHxa7uUapnqz97+E/f1Q0Vhojf3AfvYpmiIo/ciUrZiDv6Ow/JVL?= =?us-ascii?Q?QaUxQckP7d5Gc0pdeOXj+PI5NNV/jqv4vZ4TMWZE76IH8eBHmXcn7y5GMWI+?= =?us-ascii?Q?ioTzaMpgiDz+CWNtqAQuVNiE00gPQG2DPduQJd5WYL1UUqrfli+5ry1gOuD3?= =?us-ascii?Q?OVZftQQTxI6Gweyn/wW+PMuP2gHNuWXdRqlvyEGZj2IBMJKOJvvQWJNYJHmI?= =?us-ascii?Q?C0EfXcA2AhDH1avDAtcuAVgbe2HDOOr9U5Iniiz+uD3p35hhC15022APbaLn?= =?us-ascii?Q?/GWhir1GduJb7hD95N8chwNGbxSokpl+8ApwJ+IZxr0p98yShLsGZPpir+/C?= =?us-ascii?Q?B9jM7foLb4EUvdsQsWN9wyu4e7TfbI7qytxYsiT6NYlXobHraN6lUjT+0JHX?= =?us-ascii?Q?H9FaqrRJlsPDRiW2caSQWcTdbClw0sWtd7MpWyaJtNTVQX1e3EDYIAeDo3+s?= =?us-ascii?Q?LFeZGrAUgD43v0+8J1mMbpuG/3VvVC4RTKf/4rI8bBQ5HDxoUaFwAnYO0UED?= =?us-ascii?Q?HSMS3FpFBtaazO9nr6+GDC3k8F59T4Eul8auobRBexbFoPrsk7WH7E50visW?= =?us-ascii?Q?2abaqzcZGnopI4YlwA7DwBuTrxpiZVFFRlroWaa4/qhPXPlGi9WO4sqmTMD7?= =?us-ascii?Q?RxL2sNk71hObLVMvCADhU8Qfq5Z7zlf+5iAypFQkBBkAgpQCHSUywjIcCio5?= =?us-ascii?Q?kNWMvssh8WH365dBGxP0kmroZp/BQe7B+vCruGtnmFnlG6N1CRkrv/hhTKiE?= =?us-ascii?Q?CoOSR+QGQrwZwg7sR61u6K7ZUq3Tfl6tnYWpINCA=3D=3D?= X-Forefront-PRVS: 0318501FAE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0513; 23:fqD4L4A0qgZEr+iKHWgB7jfUWcsMOx8h2hPaP4MzZ?= =?us-ascii?Q?nXeP44I87VQUtOIiseTfFom2NuyjbfriX3S8yjDvmRmlQTaMIPWPvvx891iQ?= =?us-ascii?Q?QqfAE/yguUllXLHO250S9mRlAwxB2Mfy4mVXYFhi3PC0woysSccwZWLec8f2?= =?us-ascii?Q?p99ENw3k9JMHA+KOM+0Z9jRCqW2sB5/9D9jeHQIrNN5a7ALs+Hp4+AOVEKeo?= =?us-ascii?Q?JvGYejeJtplylaCRrnorrcDvTuUFwhYQwZZPBlna/mbWs5SSE7ltzGUI+k/a?= =?us-ascii?Q?JgaFzJCNRXHO/9QIaKRrCfst4QN6WBUEOrKJ51c/4BTK+9Smh9nCigU2wUQp?= =?us-ascii?Q?uoAiU1XQPHU25bYkenjrhnFPu5TE8MIv5Z7nbKDMcdpfEsVWFHwJLOrBdhTK?= =?us-ascii?Q?LINZ+cbtnFl/fOinXZz3wDEUgnKBED6cUTqx3doImvq+Eq0Ccfn9QMP4u08H?= =?us-ascii?Q?XvooxBClrgpNLdBsNLa5GOFrV3MRj+xyXpHr4+5AKjonUKVx6+IrNhuObuXB?= =?us-ascii?Q?micPKsu2o32uuFzgFTvYhkjOMMb9cpP/U5wmw5pYsR/QGdmJh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-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:43:31.9659 (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: MWHPR04MB0513 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the cdrom 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 this is not the case. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Omar Sandoval Cc: linux-block@vger.kernel.org --- drivers/cdrom/cdrom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 76c952fd9ab9..5c1fec31b7ef 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -594,6 +594,10 @@ int register_cdrom(struct cdrom_device_info *cdi) if (cdo->open == NULL || cdo->release == NULL) return -EINVAL; + if (!blk_queue_scsi_pdu(cdi->disk->queue)) { + WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); + return -EINVAL; + } if (!banner_printed) { pr_info("Uniform CD-ROM driver " REVISION "\n"); banner_printed = 1;