Message ID | 20170519183016.12646-4-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show
Return-Path: <linux-scsi-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 6B4F76041F for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 19 May 2017 18:32:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63A0828582 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 19 May 2017 18:32:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5785E28581; Fri, 19 May 2017 18:32:22 +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 F02412856F for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 19 May 2017 18:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755046AbdESScQ (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Fri, 19 May 2017 14:32:16 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:60868 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756054AbdESSa1 (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Fri, 19 May 2017 14:30:27 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="20047669" Received: from mail-sn1nam02lp0019.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.19]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2017 02:30:26 +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=uJ+Ozv5GV5j1HiGBASiTHewnueMU2q98vTP/+wlzsxQ=; b=j40fUCoIow4tRMJIas6Sw/eBXkAYAhC6iC6HqE+qrJBnRq8usAy3xdToGB9zWEiInOZibGlWn7Od9+vj/JzPBXWTZgXqoCNjQo46QSvBcJB3mFK0+nYGiRyhxtlfM2z0t8c4XtVYBAClqSgHt4//V1qKZwCMBxV0hC5jAcwUiVI= Received: from CY4PR04CA0042.namprd04.prod.outlook.com (10.172.133.28) by BN6PR04MB0356.namprd04.prod.outlook.com (10.173.198.137) 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 SN1NAM04FT018.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::202) by CY4PR04CA0042.outlook.office365.com (2603:10b6:903:c6::28) 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 SN1NAM04FT018.mail.protection.outlook.com (10.152.88.159) 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 53.5A.29323.CB93F195; Fri, 19 May 2017 11:30:20 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) 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-94-591f39bc49cc Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 89.37.18148.AB93F195; Fri, 19 May 2017 11:30:18 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: "Martin K . Petersen" <martin.petersen@oracle.com>, James Bottomley <James.Bottomley@HansenPartnership.com> CC: <linux-scsi@vger.kernel.org>, Bart Van Assche <bart.vanassche@sandisk.com>, Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>, Omar Sandoval <osandov@fb.com>, Hannes Reinecke <hare@suse.com>, <linux-block@vger.kernel.org> Subject: [PATCH 03/18] pktcdvd: Check private request size before attaching to a queue Date: Fri, 19 May 2017 11:30:01 -0700 Message-ID: <20170519183016.12646-4-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+NgFvrALMWRmVeSWpSXmKPExsXCddJ5ke4eS/lIg1/vxC3+7znGZrHgzV42 i5WrjzJZbOznsNh7S9ui+/oONovlx/8xWRy+d5XFgcNjYvM7do9pk06xeey+2cDm8fHpLRaP 9Vuusnh83iQXwBbFZZOSmpNZllqkb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x+kTzQ4xMHJxS DYxiv8VMrjKI+3lOtJLdISb7YfqpE+cOa7tM3vBHvveWMre6peGvP7zGHBO33IwuZdi59PP3 n375F7b+1t1ydN/pCQEtPq/bgmb9P5C9xKLZz7CtMW7lhC1bWDY7B1wS/HlJO32nybI32qlK ws+0PxudiHOdpi7sUf9s1Zk1An/2zDQNDb6+JHWTEktxRqKhFnNRcSIA5lPdBtQBAAA= 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)(979002)(6009001)(39850400002)(39400400002)(39410400002)(39450400003)(39860400002)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(5660300001)(189998001)(48376002)(50466002)(38730400002)(47776003)(305945005)(2906002)(86362001)(72206003)(1076002)(77096006)(50986999)(53936002)(33646002)(4326008)(2950100002)(76176999)(6666003)(356003)(5003940100001)(478600001)(106466001)(81166006)(36756003)(8676002)(8936002)(50226002)(54906002)(133343001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0356; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT018; 1:tKqaDdYP4IhMI2ymT142BtrNkTkRREDq+pb5IEJ23TcRW+e+FER8QxIxaltYVkItmCR81J9CGF67h0R5i1f4DeYvoXBvMh3a5pIMeXt+lEBzSsJNNGyXxfSEpJOfb9x2Om/JcBMRKmtZGxlCzg3o9ocPQJZf5ZzEcIz0Desnrwa7doZdsacvUgSTGyTF6/8/1kjL9g+IfwO648iNxQoFicGYwQkiu0vP+xsSeSxx3wC7Oo/MkQ+HzcjMhv6kyt6ThfqWwOYNtaB952jXV9JfdZ5+htMICP+3DzYV6JytPA1EbB5yl+ku/saApKeH9OvlnFjE/MfBZ0A+etwV6+gF4EBJpQrIESqrIj4Hj2TqLMdmLypk8LjwuX2NwsRYSA5pK8F8lGrti31N1dHg1S+VmUYNJeKu5cHSeHgxIf3OZ5OKablVBVoQ1eD7Et/4Qe6Lt6eTofkkICzAiHuYx6W47dPsrUSWjNwQU/dIM+gIn7+VQ5203Obe3NZMDqE0ASHB0OVq6zyDT/H3otpV4mTOwnUg+lslHgxHuyZsSSA0oZc= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0356: X-MS-Office365-Filtering-Correlation-Id: 130f3166-822b-4e5d-de4e-08d49ee51c0d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR04MB0356; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 3:o4GQPE/7dTbrYPDzVwYJ3LANAEVPq9r5rkmM3QSsgxLV5U8LfsP0khb9uQhNDHebT0jiuVoAKNwqunwbjiJLTfhyDQQWrN3FOaJ48SM7oZxxqUyYeoy03GXkCIBx/RunP9HMJuqgjV0p9DBQiDCOr4tybS9WLZZsltgzsq+B98ysoFjxlDkJJP9OZpGb42qy3XBTDF2l8CTelW9JMm2IhH6diqv4OP4URkMDym/R9l5VRDqXQUK45AI56xblW77exb5l/IxxVy5RMn4t99H09g+ft4DaAZJXTpb4VTUpyuyNS4y+fxTeLJVyXL8IHWFmEKBFq0wqSA4t5001r24fn/nFMZbzomkuTXJbp6RSD7251jZK/RXwClXqQfV6MMn9l1Gk3fDWVT8BMUO72h4amDL4zmO/TjMu9Yr1ucPVRvt7kRL7bssR3Vl68aYfFDvc2G1nfhNXBjQSYY/ppNasDCQRyyehA8KuYNsslD6M2diSRNc3plsdfp3DvXg94li/+v/YJlnaAsJGrV2TvugGXA== X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 25:YnWVLa3zaJHZWhR2L3q6MEU1FcQ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1u73Hz0Rh12SGjiODYwvp3svIrloFzmQnibcy9DlWRZBN5a+4NwWwtXPfXkedteN08l0ZrK4d+YEUb3w8tJb2XTHpZyGFrVl3jw1RqA1wG/nuYcURNtZSbrlKWbNmi3IUUTnX71+JBH8rw6EprGOoL160mEWwXssSBJPKPRkEG3Hc9aqu/y121NnQtNuPkwV4uFVJq8OWm6Nb1J5WHB+8GSFYIz1zPC1umwUdLsHmSs/c1dx X-Microsoft-Antispam-PRVS: <BN6PR04MB03569BB1482E715AFB6CD10581E50@BN6PR04MB0356.namprd04.prod.outlook.com> 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)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148); SRVR:BN6PR04MB0356; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0356; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0356; 4:67gQxV+NAvG0PnwP9eZaY5BpZkg+w8F2Wr2ksynUNk?= =?us-ascii?Q?rPhVzawE2ek8mjH+8GRggou+LSQF9V4cDiAhgC9k8Cba/DeV4uF6+2LwxEcZ?= =?us-ascii?Q?M+CzL7Fu8N1CLKkjrSJbQ5vKwJykPUov8lGCJWkcc5CRSGX4Xybadg9tPb+D?= =?us-ascii?Q?9OTO4Y0ITsJ4AFEWC/aIA5+EO8gx3wZ+DNIrBt8sdFtrvgwAA/96TSHKBRGq?= =?us-ascii?Q?te5lEfvWJzcTa2CzZXHwvtomFMz4JQJdBmPG1BfchzqIQEDspMXkzeKz2zk7?= =?us-ascii?Q?wp1QZpvlNev7TBHm+0cgygWvob1Fr9xBevbsp4nqXxUReFVXIbEReaKVFRdA?= =?us-ascii?Q?cUaZ31u1+wMtApxSk05thmzMibkjMknQlegmAlwIfxn82otgvWmf/jw7nR/L?= =?us-ascii?Q?QEhm9GzkqAAhbjnvggVk+a9/3vrBISvR4d5Dl9BaXGJi+R2quae5IHcrYoC0?= =?us-ascii?Q?tuCpdJwy0zWRN2rsKOU6IjCpggN4tJT3wm5dNO2cry6ppUCWKppPZK1m7VF1?= =?us-ascii?Q?9JGgZrlYfxj+5SmTyJlQnlGyacsxFbbPjoyPN6m11pgl/lmI5PagVEM7+Jds?= =?us-ascii?Q?229nfGV77Adji7K7OQGc/TUumXNZ6IYVzbzaLftvBAfnywYWWid0h1LOrD4h?= =?us-ascii?Q?Cm7YOV1ekDnyHAFItVYgpfGWmVr2lqO7FqAD+LbXZ5x2qvY9fq3itM89uVA8?= =?us-ascii?Q?RDbwHxK8SPVjTQ3+b9tQYWkgfytIFgagp9v4YjgsQVxly/f++/CPWZZ58AXJ?= =?us-ascii?Q?ndreIr0E63HP+uNBV9fPEsBlCIWDAgqpSs2gunjW9njlY447zyS5ldea8eUW?= =?us-ascii?Q?RPKjyWpcZY/qr0iRByL2ULg1TzgFM54doqNyu0PXNtOgWCXpZjIyUye38sCI?= =?us-ascii?Q?Pmm1k5apKwAh4upjjXLeP5pZMn9pJ6thwSriYo7bNh91e2cigLAlOR2rM/S9?= =?us-ascii?Q?wrDiA159qNCRgaQqB4Ucps+LY33lvBB/LSMs8dJA=3D=3D?= X-Forefront-PRVS: 031257FE13 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0356; 23:0Xgelyf24j8EZQh2tU+CuGHGYO2l/xGRS520i4z+E?= =?us-ascii?Q?Vagwolu9PXdSuFUzM7t2NErgR4JDUMRX1eIcz8JChN5mk9K4JcDLYfCPlGer?= =?us-ascii?Q?bDDzWLk5xlOnlXPqd448ZD5X5976QSR4WkVbcmtcY3xL47smEjv/bwGOJeai?= =?us-ascii?Q?1muWadZjEbK+1tZ86AKimHlNGPddjtBuaTAq9uTM+NRAyD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L8QDvPaMDMHww49GAdOfxAdP1eTav8gx3kfSj2A?= =?us-ascii?Q?zgUq59TwOYPb/r+w8cztUIcbvvw+1VR3ichlNxdSUlbryytsCYL3g=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 6:EaQK30xhzJdAKMKoM71KgqjBGAQzWL8miIWqTQ1I7fgv2ASga/hO29O7BxPuezI2pY7K6ozxo1PLILITu0qNO7EvnD7urWmxhsiaJBGiIvBRwQjK/ua18493vRId/POSOIXpeeNLgw/fmxBI4/egk9Dr4ZXRjUt6Ay/Yy4l0C41MbQNgsNorIioX3xu7iDDp+jiCa00xnnJSE94zNQQS3TYqSxzidmXvz4YAJb3DhyOGmyiCIgItvP1HZkKkIx7RF6LiT6G61Sf9GNjlxqeJtGe8xk5S8hfJfKnW9N6cbfJgPPC6RGJ6SSQcolIvuOMcIlJdQkXpBXvbp+CBSY7y7AOGisDpF2tIBDsD3CQhJnGRrtZ8WF//D11PqTTndawxzeMabrzKKncFiDf/udsfvwNxOav4pp/DE8jIkw8FgAf2SRj4l+2MIbTLDCjvH/W5DGxyA/raCttAQOEO1XOtmPRCsK5HclDLDeMiH3wkUDKsjk/PClVwYKGokVKHfmGHA49da0OcEwbjU3nqtNSNWyh+Ykc465uoXEQXMroxg/M=; 5:Q9iDJpBpYDiT2jmQAjTuNpGAGlRx8qOnt239/IVhlF01++QJAhjYIf+6Jppu0g0c3MlxA7ejuDQHb3hYhBzXc+3fA9EAJScMmDg/sSAnTZNPkS+/DtMLbGfI/0pKP8Y0s9zdkPgbH1D6aX6H5EAlvg==; 24:VjKgTYxhiONrdFWFO75ZEeYTmoVIYMLjBH/ZistPOoEb53pyGAaa8sukT/jRB2w8mZBPVW2lRr+TbHfsrp8F8/soa6mY2TWVYvpYrr26mzk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 7:VofkhXxYsmcMTAq948/Otrzhw0dZ0F6RY2je0B1xtWzPVuPfXtNzFz/jKZtvADT1AanC1KNbD86i/dwdpyaq+o87UTXNYn5BMJB5K62jo050u086NA7YoF/xzSaTRmm2Gx7Rwt9YAbqBtm7m8UI4LWfSZRfkwVes9plMHgQWLzWwUWpfzleT+jCcdIfn1nJknl/VBE1jPwG5TeQQsZA+XcGODc5T2c4GDln6Wzat/m0RsChjDr7poxwkitTN96xUfyTKtWIO6cxzfGGLUU2L2p+Htn+tYW2qNj3BhjHFwYV2RZDA2d5qNwVk7wc6xeT2eYe+5O2I4IVc6O0EVG8PKw==; 20:wAI/2AGIvORmbpw9//QZVtBrBsiw6uVXMzrU7HoayOENYf+zLdPe68LOegiKawNVgvSmpoZkcMc5sKsetWrryuTf9tB/HkjpX4pvdoeupFcKkAErpil/dnjyQo/JEKeGcebwKMUiSqTz94mVdrKRQjv3YWYPT0mQZvD9Cn0kP6c= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:21.4577 (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: BN6PR04MB0356 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 205b865ebeb9..4134bb54f6ad 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -2583,6 +2583,12 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) bdev = bdget(dev); if (!bdev) return -ENOMEM; + if (blk_queue_cmd_size(bdev_get_queue(bdev)) < + sizeof(struct scsi_request)) { + 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;
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 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 <bart.vanassche@sandisk.com> Cc: Jens Axboe <axboe@fb.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Omar Sandoval <osandov@fb.com> Cc: Hannes Reinecke <hare@suse.com> Cc: linux-block@vger.kernel.org --- drivers/block/pktcdvd.c | 6 ++++++ 1 file changed, 6 insertions(+)