From patchwork Fri May 19 18:30:02 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: 9737941 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 248C6601C2 for ; Fri, 19 May 2017 18:32:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CD4E26256 for ; Fri, 19 May 2017 18:32:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1119D26E4E; Fri, 19 May 2017 18:32:35 +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=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 7E08B26256 for ; Fri, 19 May 2017 18:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756315AbdESScS (ORCPT ); Fri, 19 May 2017 14:32:18 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:18061 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755866AbdESSa0 (ORCPT ); Fri, 19 May 2017 14:30:26 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="18907175" 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; 20 May 2017 02:30:24 +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=h5pKaqiKczT3pJlCA5RSjqXRnnerApCR30SWoJFm/ek=; b=dQcK/Ignfuj1bUdtUItsJyU91h1NN6cZ268ryZgHIgjMMEKhkgSiQvtp5L8KKZW4u3ZZeXzNHJgafwfMEtY1/IbDK2gGhXS+qP7wZ0NIqnntNz2L8dHVnWQPAGnrwUnPkJq7az/Rtf403U6lFwADoajarN33AjyGoBM4GyK7z5A= Received: from DM5PR04CA0041.namprd04.prod.outlook.com (10.171.152.155) by CY4PR04MB0358.namprd04.prod.outlook.com (10.173.188.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 18:30:22 +0000 Received: from BN3NAM04FT027.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::206) by DM5PR04CA0041.outlook.office365.com (2603:10b6:3:12b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Fri, 19 May 2017 18:30:22 +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 BN3NAM04FT027.mail.protection.outlook.com (10.152.92.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Fri, 19 May 2017 18:30:21 +0000 Received: from MILHUBIP04.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 B5.5A.29323.CB93F195; Fri, 19 May 2017 11:30:21 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Fri, 19 May 2017 11:30:18 -0700 X-AuditID: 0ac94369-548749800000728b-9a-591f39bc7208 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id AA.37.18148.AB93F195; Fri, 19 May 2017 11:30:18 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , Bart Van Assche , Jens Axboe , Christoph Hellwig , Omar Sandoval , Hannes Reinecke , Subject: [PATCH 04/18] cdrom: Check private request size before attaching to a queue Date: Fri, 19 May 2017 11:30:02 -0700 Message-ID: <20170519183016.12646-5-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170519183016.12646-1-bart.vanassche@sandisk.com> References: <20170519183016.12646-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsXCddJ5ke5eS/lIgxVvGS3+7znGZrHgzV42 i5WrjzJZbOznsNh7S9ui+/oONovlx/8xWRy+d5XFgcNjYvM7do9pk06xeey+2cDm8fHpLRaP 9Vuusnh83iQXwBbFZZOSmpNZllqkb5fAldF7/itTwVnOiiUrDzM1MP5n72Lk5JAQMJG4dfon mC0ksJRJ4vwL5y5GLiB7B6PEzmPvWboYOcCKFlz2gYhvZpS4d3U2M0gDm4CRxLf3M1lAbBGB QolL2zoYQYqYBd4zSly+sIgRJCEsECKxZP5dVhCbRUBV4nHzKjCbV8Be4tjzU0wQV8hLnN2y E2wop4CDxMvjC9lBFgsB1dzvqweZKSGwjlXi/o99bBC9ghInZz4BW8wsICFx8MULZogP1CVO LpnPNIFRaBaSsllIyhYwMq1iFMvNzCnOTU8tMDTVK07MS8ksztZLzs/dxAiJiMwdjHefeB9i FOBgVOLhTfglFynEmlhWXJl7iFGCg1lJhDfaRD5SiDclsbIqtSg/vqg0J7X4EKM0B4uSOO85 makRQgLpiSWp2ampBalFMFkmDk6pBkabhP3nv2Q7nym9dLrP8d/+jzdFtu+wN/P53dGdnT57 SWOwvfMxparP0jOqRGULXR+s/xkiaBTiXfniGcu2GYxMptpc+mZdv0V92ewEZpksb5OS61+/ y0iU71PFk2+ulcebWXzCbzzXv9+wvLzxTK7oJqk7hfsXP560KHErn1604OP1loWH2ZVYijMS DbWYi4oTAXzpIf+EAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIJMWRmVeSWpSXmKPExsXCtZEjRXeXpXykwdR+cYv/e46xWRz82cZo seDNXjaLlauPMlls7Oew2HtL26L7+g42i+XH/zFZHL53lcWB02Ni8zt2j2mTTrF57L7ZwObx 8ektFo9pa84zeazfcpXF4/MmuQD2KC6blNSczLLUIn27BK6M3vNfmQrOclYsWXmYqYHxP3sX IweHhICJxILLPl2MXBxCAhsZJWYcPM3cxcjJwSZgJPHt/UwWEFtEoFDi/unTbCBFzAIfGSXO 3ToClhAWCJFYMv8uK4jNIqAq8bh5FZjNK2AvsWDrJjBbQkBe4uyWnWBDOQUcJF4eXwi2WAio 5n5f/QRG7gWMDKsYxXIzc4pz0zMLDI30ihPzUjKLs/WS83M3MYIDiTNqB+P1ieaHGJk4OKUa GAv7b6vtOd5knvb8xUNNc/eSnktlQS+Dk9f/VfuyIXTVz6vcfjvSZtitOcWbOXtNaVVlTW9V 0xeH9aJ/asu3pYiK67k8utrauq2X29pyv72Xi0Tsr8yVoWKhnwP8shUyD6y6W+rBL3z1J0P/ 02brl2snq0tN45B+nrrfc9uC+fFHqmT9/5p/UGIpzkg01GIuKk4EAJNBwu/UAQAA 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)(39400400002)(39410400002)(39450400003)(39850400002)(39840400002)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(77096006)(50466002)(48376002)(72206003)(47776003)(54906002)(81166006)(2950100002)(1076002)(6666003)(53936002)(38730400002)(356003)(5660300001)(8676002)(36756003)(106466001)(5003940100001)(8936002)(76176999)(33646002)(50226002)(50986999)(305945005)(189998001)(2906002)(478600001)(86362001)(4326008); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0358; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT027; 1:bs+FV2oUMCZzym4Gzg3BB19hOMTOITDT8ubFsGpvlbb7EMBmlQbnCBfdcDfzJkSFKrHPwpqYCVbI0EGrBnMhMXjkuG3lRxRkIhgd+Abi+6GPsn9vfzFce9a3KospbFtzV4B37jCif5ies+heVc2u72oWvZOkuvXF70BZ/ITWjC2HTjr/tlbD+zncnmocR8/hu9C7DPJZAVzYxNAaq6j2hWyXPme2vNMCqSDLDy2RJMPC2NlrXtIghmIUiNWXqJ8XF0lbrq8YpbYujaGNnRq87aovblcv7DJ4b6Mo4wtQlAp4bmMTSw0IkFjVGGup4FAK39R+MBwX5DDoZjdBYfDpyTs3vwakjgXRmMIQGKW++aDzZR3EOeFp818kbnWHr3KhG43FNqQXnxVoZkZZtWwtIe3MZhfPx3Qru3jAuHrFwIhbvo99iz2aPzjOrI9xrUcW78q/g/mSTyIupP7wUwUhlcAw9gBwLeqElHbGqKPyYegcHanVZM+FCv+nFOuwKPsHrXwg6Q1ktSKYDIjbJ7P7WJKqMMf83aadfA86rPEcffc= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0358: X-MS-Office365-Filtering-Correlation-Id: fcafbf69-d1c4-465d-edce-08d49ee51c3b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0358; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0358; 3:rplpkSMtLOuUMtppYgphlgnKB9kCovPO9D1xT0VNVqw0IPYmcAUrBcciTzAeSZARiCi+bAVlRGgbt+hrLr1m7C809k0CY1J2eahfYU4v78qkH124QM6xyVb2IZLFf1kVAbBx8HD8maNEEGxo9bpu1TAKP6V9ku/eg4jhV3kO8Cgtc75qq0vh+X1tWzDMOcOywiap2rYlgAfXDZsKygGbsm5bEdjDp/fg/PahRObx5sHPvZ/vc6lVavpymNwfwqEs3sVPrjnkvVfPuVTrYoPF7SkcJ8zUWbD7TVKKOsxbQS2tjAsptF2MG2/mpI9DuLfQuGPAZ6mCXmbtqOvnK/9WkQT6+zFF+P3ZVYnibTtPSGruJwlfRQQckIxbvoRqXbeBVR3zVeLh1gaKc+USTq/ofCGAcSHez8Bofw4f8tP/obSkQKbjtbLooZgnNof1H4QSZA8BEB7RcMCXIGitaRNPJ/k9/9fLKFK7G6befgV4XStdlTKNOxRubXS9ajz81ieL X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0358; 25:1DmHyygL55juYvdxoTHkgLQikh/YLCtn9hZENSGN46LGeH+ZSRd+IcCdGuoSIMfABHpPwkHa2+46XNMXlFPH8vCIewdTGmgaAyYI7sFa8urGEZ6JKa298arkLwBVpA1CbnrJnJOr/n4VR/lbUwMJxPZ2GLNGQo4QNKr9jTUzwUYqKfddEu1+suiEBLjd8tRcQraGgNusrmJYPGmJ2655MaWT545Ego1hC/SumclTqC/MfO2Qm5LkEuo6DlIhmg/XkiMWtgRbIWinqpqNqxEpEVCS1USMW1Cq4u+cufvfb4FcMbg9ZjK+hD809LtkJcuzarkMwy3E/8UeO5YPGLU3Z1T5eXMpg/ZhZeG1V6T9SjNcLPA2fF5aVRKPSQAX4ciCntJZZdnEYW2+10w5nT4EUckGQp0Kii73xD2eI/nqW7tFgC0NrchEJOzKIIlVAI3MC41DGE7/ldv1hp8wxPsnRrJIcN/fMvsQLj0mVyBhnTI=; 31:VKScE8jz1k+Fx0QM8p03I5ypcIRPHuuQXHf4c1JRhMS4q2rgGsKDbPMN/Js7G2TlGDhiFs39RVFsPbvmCq8rhN+xe7/v6rl5u3IPTLLeGg+wKEoZ76spFnugKhTw3+LGSXfhaoJSsIej7hqhP8a4BM7BiQxiYylFBGWyXVTWt9UYDdLn9OWMRoPyyRJxcGzDK2i/6kbxsXkHY4Q05JchWadj7+0WU1XSZnDILVxI9eO4NhRgj2IC02/C2uuSx76KCAwC3VkNqFRX9iU0vYTx4g== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0358; 20:b5kU5BsVRPrV0KKONTVFYnzoa8RNAalIxSvW6Hm+aJ1wt9SdFs58yXGfHi7nr6DB1evZO3jkpm0EA1YYRcqGCg/W6vUHVw9eiSatbCwYbSX9w6Dyy1TO9FlTquJ1coT+dA7QkyGU8ARktQH5+ZElBg8dLKqJhQd5u0u0VT8lz5XG+9wo6ZaeuK3oVAA5Pe6OvlcHyU9OT0QpcmXdoNykAv1UzXadmkI/VNXbBnLQ4Xd5kRP3WUggfegMfgAROaQIiwLc/FlsTB9dtDkNHkAwLDesWYR+dvAkulhDmve+41s7Xbd9g/czwtMAKuvPxhbXnfOKSdba9lZOMLBZalgn8TY424cQ6nnt6OmHc/IrAyZ45rwfrwq+SkeK5CgcYcwdqqtE5uGgWzKa5ZAYyw/diW2M60pAh9tbWts/jDN0vLB11yYRr4tk3qcbvzvPNhNDanf5p8wBRl7O28h6fxfcdFJdCHnmeKBq8I8ebTdzn9lLtyM7ouyP+HAiybZTD0fX 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)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148); SRVR:CY4PR04MB0358; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB0358; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0358; 4:49pMN5d3j8t4il4Bcs33xoTnC9a204PA/tdq82Fkvf?= =?us-ascii?Q?rZcsR4+2hBFPigvDtzqTkk1qM6NKVNdD6uhFf9P6sFRivykfTDCmVEqigXB1?= =?us-ascii?Q?mbb+Tp8psXVj8em6oRLp5/wHRu0/o4ADiEMdJk5Uwe9PsjwO5on11nXLLldl?= =?us-ascii?Q?a1xdsWqPsEALiMpbsdAWsxhuxSGdhOiZxyzdZeVa1OTbJvXllUSr68lClgyT?= =?us-ascii?Q?bj/uvk7LoKlUSAiwEL1zUq15ObetmP1x/lPeM3aUTJTrDpyzJycpLwd8vDnT?= =?us-ascii?Q?Rr2j8IksG04iKqe6v3dtQDPbmOF1ZrSad+JryooNf3QpPmBslJmLWyc+l56o?= =?us-ascii?Q?esAV2HTG3cD7cL0efcvikS/ROCS80BJxKmVXm5DWzTTyMBFnEcgjnQeE0z08?= =?us-ascii?Q?iJrA86zq7gBZtoz4XgqnOOVPMvCPxlxhYqI+wg24BOHwqGAVuxY+jkdlHiMK?= =?us-ascii?Q?yi/HTTuljnyEsdhUCY54thHKGslkD8DApy+6aWn3RXtKnKXEpJzJ52XbMMrl?= =?us-ascii?Q?rAkkfU5nXIoHGBLdkieb/HGWq8wA7MvUMwgyfI2BdmmvB9ZFnJzybPE0NNPE?= =?us-ascii?Q?ry125mefAgEPsYVyc1iwqjHNZVQJwdZK7sNx+HG/QchFkXsxQWnoRgmsLLLf?= =?us-ascii?Q?R0XPK+L/eJM4dvQJ8eQNLopax3J7iut9ZKMxUXFAK5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gvHl6c8MeqoC7p19NZg= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:21.7283 (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: CY4PR04MB0358 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 the private data is smaller than struct scsi_request. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval Cc: Hannes Reinecke Cc: linux-block@vger.kernel.org --- drivers/cdrom/cdrom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 76c952fd9ab9..dc20e4368136 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -594,6 +594,11 @@ int register_cdrom(struct cdrom_device_info *cdi) if (cdo->open == NULL || cdo->release == NULL) return -EINVAL; + if (blk_queue_cmd_size(cdi->disk->queue) < + sizeof(struct scsi_request)) { + 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;