From patchwork Thu May 25 18:43:14 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: 9748925 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 853FF60209 for ; Thu, 25 May 2017 18:43:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BE4F2679B for ; Thu, 25 May 2017 18:43:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 707E4269DA; Thu, 25 May 2017 18:43:56 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 EDAEA2836D for ; Thu, 25 May 2017 18:43:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967167AbdEYSny (ORCPT ); Thu, 25 May 2017 14:43:54 -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 S1036473AbdEYSnj (ORCPT ); Thu, 25 May 2017 14:43:39 -0400 X-IronPort-AV: E=Sophos;i="5.38,393,1491235200"; d="scan'208";a="21570888" Received: from mail-cys01nam02lp0055.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.55]) by ob1.hgst.iphmx.com with ESMTP; 26 May 2017 02:43:36 +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=qukiwOPz19mbsjlgbbhCUtslHiT5xDHrYfIpYCICvCM=; b=V4rIDGabxFBQx0pxLQxId2YeNgoPZm8RAH+N0uKX7EkMgf5uIUzwmo5mCAhSeJfnApTS8MOMySRUIxvWyvtKEEjViswEWexjlj4zQxVPha+k+wVRCuQRznC6LBjcUvsqB2yMt/bb3LOHFD+q58RWpjwCN7zXHTLLT2rg81+BuUk= Received: from BN6PR04CA0029.namprd04.prod.outlook.com (10.174.93.146) by CY4PR04MB0359.namprd04.prod.outlook.com (10.173.188.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 25 May 2017 18:43:34 +0000 Received: from SN1NAM04FT047.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::207) by BN6PR04CA0029.outlook.office365.com (2603:10b6:405:3b::18) 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:34 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; kernel.dk; dkim=none (message not signed) header.d=none;kernel.dk; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by SN1NAM04FT047.mail.protection.outlook.com (10.152.89.225) 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:33 +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 9C.2D.19026.4D527295; Thu, 25 May 2017 11:43:32 -0700 (PDT) Received: from milsmgip11.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; Thu, 25 May 2017 11:43:28 -0700 X-AuditID: 0ac94371-41ba798000004a52-98-592725d4110c Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 7A.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" , "J . Bruce Fields" , Jeff Layton , Jens Axboe , Omar Sandoval , Subject: [PATCH 06/19] nfsd: Check private request size before submitting a SCSI request Date: Thu, 25 May 2017 11:43:14 -0700 Message-ID: <20170525184327.23570-7-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+NgFvrALMWRmVeSWpSXmKPExsXCddJ5ke4VVfVIg6/z5Sz+7znGZrH6bj+b xYspURYrVx9lsvjw7w+jxd5b2hYXDpxmtTh87yqLA4fHxOZ37B4bpjaxeVw+W+qx+2YDm8fa 9pfMHp83yQWwRXHZpKTmZJalFunbJXBl3D63jKlgJWdF/52jbA2Mr9i7GDk5JARMJFa132Dr YuTiEBJYyiRxoPkmE4SzjVHiwNF5rDBVv15tgqrazChx+fEsRpAEm4CRxLf3M1lAbBEBBYme 3yvBipgF5jNJtPxuANrBwSEsECGxbW4CSA2LgKrEok9XmEDCvAL2Eq8/sUDMl5c4u2UnM4jN KeAg8WXqRTaQEiGgkhM3HEEmSgisY5V4/Ggh2FpeAUGJkzOf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X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39860400002)(39450400003)(39840400002)(39850400002)(39400400002)(2980300002)(438002)(199003)(189002)(9170700003)(6916009)(6666003)(305945005)(2950100002)(5660300001)(86362001)(106466001)(1076002)(478600001)(72206003)(53936002)(8936002)(8676002)(33646002)(47776003)(81166006)(50466002)(48376002)(110136004)(5003940100001)(77096006)(38730400002)(50226002)(54906002)(356003)(76176999)(2906002)(189998001)(50986999)(36756003)(4326008); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0359; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT047; 1:QWNc3S56NBDX9azcLDH0vIKJYzR1YzTDX+fAXn9R9/HZ1eJj0EcvXv8cEFVRfzXssUVZT/3dmimioSyuweNNfX6n2XoA+a+ymQA7NplTug0URrXl+8O0Od0+k7GWyDEIP53QmIvPgow/oC1e1INiBnLGZZN8XuSQBqtdrfoMuwvTl0Q0GfQk6j9LZAWxq4psZq2QiBBgpH50KUcQ4TmOKTPA2bbeRqet8/NcHcqZGY4n0v1KpZD/eIR3kME18Xa91RWW7nejjLvBY8Ivxc599yEJlTWqJR9TL8Nz/Yhza9P3qSlC9MvimyZnDZxhpxtp55DpP3BwerPYqB73Zsgi3IoXNMt/1SNB8NGt3dQZpIndj4fWk9pEx8lcug3q2hUxFOKk93D8aCzCTm4sAQQqslpzZWSwaJBf7EOaUa3LEy7Rghnmy4aJt21OokiSNsbGveGZDGpZ2RyC3+n0en57kN0BPU8ql/fQzH7wIwDHYo+ypnSOX9IVDQU5TbyJNM8m X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0359: X-MS-Office365-Filtering-Correlation-Id: 393df152-e063-4aac-ef0e-08d4a39df274 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0359; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 3:+j56iueXydy0jtbG2xdqNm5p2kZe5+WSV/MdpfjcIZ3fzpSDlIvqPBh0xUYbpuZuP7xIPUnj78xR/Se2JgF9H3VnrFBbWmMrasvJE4BkjJ/VR0037TQ31fGNvGo04EJc7+mmBfRAVbgWjLMewI0nqIXztZg5Cz5Ie2k8EMZWOo6hehUB+yxbABxv2pXf0aFlC0bzC/E3D/cBBSOuiq4BvhQCM4vtvnC/v21zEC3qJHXYQ9mXkmUVEcWZrJFG+9r1LgSNfxGazdkIfWWO/GfK6WkU429QINBcj9JbJamzkVZWpKv9ENrysZqyJGHPD50YWo9Y4EV5S5CEGqSSupnXNpzbZUURY15Y9+vVi+KkqE0LaV0cvlEtliNNosvSfRqy/gUmKBfwTGdY4NPAMCL7XCgyNQIR1/g1IvM9ln5CdvkeHlNNX7XomiQXbQ7XJhujvOIoEJzV5Tzo3/JckZ9Rd+a9WWVqPXZR/HV3zwwNzVGgrJNCk7LQUqvua4q9SHV6 X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 25:OzMwARVh+b4FbMXIIbJbHfyuZ3T+EhUFoFXCpTmFmqQC50XfaBHfsHmKKcRQsFO8HI22vxvRiFIeYl875pxzadidsUPkpDJ+ypnM23kgGxHY1GgL2ZXESwfHFk9mjUY4Rts3Xfa18UuHFdSWOmANJFdD5RNPvS19Uasc8FH+uPPL1VDNDfWmHT9JanT6F5kkdLbcyj8Z9uDPI8gEilhhPbAxXIUbpuwhasqQYk0dlBW2iCFMJZLiB6y1s7xF5L0NFvlmIJ/eegdiP3Qos51cFdyfdbG831ZnA5WsdwkvvjT2v1/2Ytx/lVB2XCD7fOQ9lqe0gmMriqzY6umZ760opLXLHAfMv9pSYemjyP7q44AKSDpez23Mx2nUYZdfTEQ/t1VsXZukt8fpbtQYWPtaO0Jh4LN1qtKSTTogcP2TKMatK+NjsYeOr2aZBKg3U15j46DFbO9TVcGUE0Iiu7C5VSR3oB8MjSLe9NPGo9qfd7U=; 31:uEsIiu4zCnDVVAzFaMg/pZhZrfvJ49JMa7Ag85Mna43S5SuEXvmDqGr0kOc9wVQQsQGSOu/eJhrAMhekGNtl2YElqXK1T7YPOp9DQjtX/LbNhpjr1jdXURDgP6lMWehEIZmGhm2GqX1CuUDTPfvtTkk0SARY/cP2j1WbavYrSMz3KmQWXmtsWONOhFu7877hR3ZbWbem14xEgiDZjlpHVY+toqDWIb6+YOsKfhinaDwNEc0fgZvkSAh7c6HLtIq1pvkVmdq7WGpdGVyWZxKXiw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 20:GLxZodRY0Pxn9lWyZUxYoB0jrFMuyu3kPALXPU80niYp4PoOWU1Vp+VKN3IWQlU5xpDE5/9t+N/H6Mral6VtnHRuf7ygiwd0Z9f8U+Lsids39pkGF/XntIFpyBHQ/sC7bFyKcjOuscW+NT2AyE3nnJ17NjGGYnQs+z2hoNnrvldAWXRrPWpidKsm6J5gTR6q0l9cztpw9b1v5eT49kHgAxnIjMXlfA6ZDSJY/WOlYmBczGim0J+zagCSwv5YnDQzdn+zj8pwPNivi1t9+9mqOkyTQUGsmOv8Xl9qej2T0VkOaIitQr4CtH4jJEmwmr+M5U+xla6JORrAtSuANn6WFdstuN0ATnPouBg1VgPXwPbExOSMuofnB2mKyvv8NTBEAUz0UGaxhvyK5jugumFzXt7TVofrFSLHtcUESq/tOjXB2iAbaptY9uSDZToBqEaqabgi8GyktDXaKFb8Wr2A2XJX3PkBP4ADkjOK0gPxJQkbTfDz4OWh63LIlY1DOuL8 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)(13016025)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:CY4PR04MB0359; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB0359; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0359; 4:x9sv5VvLYUe2v/IQBzUn2B9sE8BZqNQA01CyLURgUK?= =?us-ascii?Q?tzk5vnKq6LmAb23kj1mNpxeQE7vo1xgQUSAJxHkjkk7K6WIZsvR2iR12i1L9?= =?us-ascii?Q?5gkyGnKqtpKmuDegVzlg11dfev1VuMiY2lDbaOybv3pnkWsYp1YHX9g/hPG6?= =?us-ascii?Q?V5xFSHGfhxyfmFvdaAJwqSXQPNWBj6BjyG9xwIs29ZTi80NDfRf3jKU/r06v?= =?us-ascii?Q?5HvFsUbDjVS3TkCZnk8A/fZSfL+RDL4FS9JWD4lL3QkUdT9wVkUdjRylnM2G?= =?us-ascii?Q?TWjV3nnOagMBHbutZmZ1n9LocAErt83K9vToQvWCFamdmnKihXl9d9Yee+lk?= =?us-ascii?Q?DHpAqhEnm2SJSLi1mCXQB539INvbqtqoHCAFBMyhdJkHtDnSJEc99Q8sO4Q+?= =?us-ascii?Q?aSQwhXGj8Yq1kWo3LzYcF28Gujh1GWBFgOiZOsfKulzvfpML7FaBycR8tYub?= =?us-ascii?Q?tB5WUTvaDPIj/t5jYO8DfDnkAq1J9+c7nglQ5FrGdfnYDvfG/VdZJPc4CgDj?= =?us-ascii?Q?lGlDtD+eAxp2Ej7fzlrtn4ebn2j47yTBvMBVkas+oFhTOpixPItsZawh69I/?= =?us-ascii?Q?B3gTummT2qP2zEn9mIK/qJnIvlr5d34pEOyEenbI694nL3x2bghn5NDtQkeh?= =?us-ascii?Q?2T/DCTwD64Yi+QaorMvK/pbUJlzn66zPgiiiV6FDhkruybXOtpbCzZrp3s3l?= =?us-ascii?Q?Ge1hPnQepOeijvvoIwGCKMjq1SBAUvdx2SZfZZssYtjk1CNX2Gebyx37o1Ug?= =?us-ascii?Q?sBwzFh0+DhCbL/f8GcxU/PQ+OtcehWxbs++KqMMNfJ7c/7aaLGsmVb42tFby?= =?us-ascii?Q?qCsUdHUjt07b9eLlzD+92E9YlMF9Z+9mLijTt4tJmgQ87aboMS+9CHyjZUCi?= =?us-ascii?Q?Mp4N06JbwhKmCt1hpjvlnkWzefCYr9lqZoj7Md8hhCHkCYsmWTanwvy5jGWO?= =?us-ascii?Q?UfawOsc16Ve7ESGNWwRRkrepTFuesIxurWHS1rTw=3D=3D?= X-Forefront-PRVS: 0318501FAE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0359; 23:3/ec3xvWd3NgAFaZt4WutL46caOAj0q/bmQFd1TBs?= =?us-ascii?Q?z4q5OVVQdBLnryixIcbuahaOP7XnbSWjSbnakrCcjt4NkfcmQOPc1ANVL0ie?= =?us-ascii?Q?cseWozpn+xTxaD4EbWrF14qdHVji2u390ccproskVNSRasH999qD4bFqxVzI?= =?us-ascii?Q?py41lxviaM5rAG+FzlAG+mCWaFfT5C5i1hf/RV7b61Wh4vYCkGUgbvBG8YJp?= =?us-ascii?Q?sd/pjM3Mokzj+L9MUB33MF5eDQkQlGpyvadpJYstChWgOjGS2yGQj+gtsMFA?= =?us-ascii?Q?gUO14xc7nfgx5ZeqSk+co1Sk86OHzY6f3XP7Zu6S6SxBOIv+qbJFBRFxhkKM?= =?us-ascii?Q?Au3+oaoGotyL4BVze+/kSDfeYbAO99VYenNJ0GmC8897kIgE8yWWrM1XxwgE?= =?us-ascii?Q?1rxk7jRGrn4O8Tj2CiXz/fjKRtyfbPHO7gEfCIA0e/bjbpFwuzpPctv+Tq60?= =?us-ascii?Q?/RPsyCzk2f52s7nyMGDplRKkHJtJ/29Vn7bVcP8MwJ8uoQnJ7lzftVxaXK7i?= =?us-ascii?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1r/MRg7pdhecU5P1EUmuWIRRW2l6YpRJmtcOprXmlWKdoc8xsRwnjs1lm9hN3g= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:43:33.1993 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0359 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since using scsi_req() is only allowed against request queues for which struct scsi_request is the first member of their private request data, refuse to submit SCSI commands against a queue 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: J. Bruce Fields Cc: Jeff Layton Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval Cc: linux-nfs@vger.kernel.org Cc: linux-block@vger.kernel.org Reviewed-by: Christoph Hellwig --- fs/nfsd/blocklayout.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index fb5213afc854..38e14cf7e74a 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -219,6 +219,9 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev, u8 *buf, *d, type, assoc; int error; + if (WARN_ON_ONCE(!blk_queue_scsi_pdu(q))) + return -EINVAL; + buf = kzalloc(bufflen, GFP_KERNEL); if (!buf) return -ENOMEM;