From patchwork Fri May 19 18:30:12 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: 9737905 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 5C1016041F for ; Fri, 19 May 2017 18:30:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 538682856E for ; Fri, 19 May 2017 18:30:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4828728579; Fri, 19 May 2017 18:30:55 +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 DADAD2856F for ; Fri, 19 May 2017 18:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756344AbdESSah (ORCPT ); Fri, 19 May 2017 14:30:37 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:58563 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755824AbdESSa0 (ORCPT ); Fri, 19 May 2017 14:30:26 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="18913365" Received: from mail-sn1nam02lp0022.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.22]) 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=xmdmOVDynIy5enMa1ncM4AvTztu4N8KFRAPGHj2/Xss=; b=iBi/fUloEFqEdt9P15lWacObS49QaXm1WjDToGj6Q9EaFdHfOY4gHZqB5r7igiMoQpwzJD44bKq9lJ0DrP/iI2kueLtw+XkJwWkGCIH+39X4w0OBR2JXLMJft2xJk8eztzWxJ5B73UQ5yVYQxjAkbBrF0lnR1ahcRVOVPwwC4OU= Received: from CY1PR04CA0003.namprd04.prod.outlook.com (10.166.187.13) by BN6PR04MB0500.namprd04.prod.outlook.com (10.173.201.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Fri, 19 May 2017 18:30:22 +0000 Received: from SN1NAM04FT019.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::205) by CY1PR04CA0003.outlook.office365.com (2a01:111:e400:c5a5::13) 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; lst.de; dkim=none (message not signed) header.d=none;lst.de; 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 SN1NAM04FT019.mail.protection.outlook.com (10.152.88.152) 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 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 B1.5A.29323.BB93F195; Fri, 19 May 2017 11:30:19 -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; Fri, 19 May 2017 11:30:18 -0700 X-AuditID: 0ac94369-548749800000728b-8f-591f39bbe6d0 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 9F.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 , Christoph Hellwig , Hannes Reinecke Subject: [PATCH 14/18] scsi: Make scsi_initialize_rq() zero the entire struct scsi_cmnd Date: Fri, 19 May 2017 11:30:12 -0700 Message-ID: <20170519183016.12646-15-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+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5ke5uS/lIg57VJhYL3uxls1i5+iiT xcZ+Dovu6zvYLJYf/8fkwOoxbdIpNo/dNxvYPD4+vcXisX7LVRaPz5vkAlijuGxSUnMyy1KL 9O0SuDJmb//LXLCZo2L78oesDYzt7F2MnBwSAiYS+051MncxcnEICSxlknix6A+Us41RYtfa LiaYqrObt7CA2EICmxkltuzQAbHZBIwkvr2fCRYXESiUuLStgxGkmVlgMqPEzOYNjCAJYYFw iY7DfWDrWARUJb7vXw5m8wo4SBy8uIoRYoG8xNktO5lBbE6g+MvjC4FqOICW2Uvc76sHmSkh MIlV4tLSVmaIXkGJkzOfgC1mFpCQOPjiBTPEceoSJ5fMZ5rAKDQLSdksJGULGJlWMYrlZuYU 56anFhia6hUn5qVkFmfrJefnbmKEBHvmDsa7T7wPMQpwMCrx8Cb8kosUYk0sK67MPcQowcGs JMIbbSIfKcSbklhZlVqUH19UmpNafIhRmoNFSZz3nMzUCCGB9MSS1OzU1ILUIpgsEwenVAPj 5adaLHt1/GM2H1gpk3rhz+okGx/1h47iG5Ri2KZeWDAld/kuDS+2KBWjd0+Fq0LLnlWtmuHe V/R79vE8aaudfo7lWxmY9yv96Mws4hbfkl/h8J3p27mP87PiV88Vm26w+r5Q2ONY6Z+lN3vM Zeed10wWW/xt4stX7k/4z08TLp8s7H7e4sJzJZbijERDLeai4kQApd0L2XICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPJMWRmVeSWpSXmKPExsXCtZEjRXeXpXykQeMLQ4uDP9sYLRa82ctm sXL1USaLjf0cFt3Xd7BZLD/+j8mBzWPapFNsHrtvNrB5fHx6i8Vj2przTB7rt1xl8fi8SS6A LYrLJiU1J7MstUjfLoErY/b2v8wFmzkqti9/yNrA2M7excjJISFgInF28xaWLkYuDiGBjYwS v+fdZwNJsAkYSXx7P5MFxBYRKJS4f/o0G0gRs8BkRomP63aDJYQFwiU6DveBTWIRUJX4vn85 mM0r4CBxre05I8QGeYmzW3Yyg9icQPGXxxcC1XAAbbOXuN9XP4GRewEjwypGsdzMnOLc9MwC QyO94sS8lMzibL3k/NxNjOAg4YzawXh9ovkhRiYOTqkGxvm7nDew/IqIDL37zMCMr3rNRNej L62TpztN6z6pNdUp6ZlWxgy7VXsKs3dVlF1I+7goq7rI0UX3T7yjwFTZqo7SiUVlApUJ1a2b A3qNl+jXz1eOEm5gSxE9w9UcbKQXrnBZ8OTdJ7sfrVHJeubNwrLv1O88iYDgLZWHZl5u51rX vultxLctSizFGYmGWsxFxYkAXVvD1cIBAAA= 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)(39400400002)(39840400002)(39410400002)(39860400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(47776003)(48376002)(54906002)(5003940100001)(50466002)(8676002)(106466001)(53936002)(6666003)(189998001)(86362001)(305945005)(2906002)(72206003)(5660300001)(33646002)(50226002)(2950100002)(50986999)(8936002)(76176999)(81166006)(38730400002)(356003)(77096006)(478600001)(36756003)(4326008)(1076002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0500; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT019; 1:69ydFAP4TqpagcLZ3UqbfsPc6lAiNE72/19A4vn/R/QKdorQoHk8u/Kd0oTsNHJI0DlwPJxfGvFrMtexVXf8D96nrZ95lkrnwuC1AHgZPfOTQO3akFcIs9kLCWahFn+GtnEGe9BntzRxv7vMfp8xFl1cRpzN+UjBmpTdjsdQkAuLeixQlxYQ05IdVErWyxt4XokzQRdDOja99RGOYybwsZJS5oaCsD+7ZyySzAbVbOgBAtZZPP60oOKqnuVQfiI4gbatWAYpYDV/OPlONJhzVB6a9uJtv2Z9jn88sCAb9U0grZL6VbsF8xxOQT/TEKBKwk88ODvjljBm0DCCM49E800Tmp5yBhLz0PEjmJFLe9WcMJr/AfpGXw+osULu9cobus9XUm9HmeC9zsD8K5CeOswh4C1VKo3zcHk0F2SN6J2UDNIhCxDPGfEpCM/KRHPUKo3Dxx9f0g8af88jVPY5WU3SJegIqDtQMEJoOuutYP0LXKcFsvx1w3f05JHwQRgmP9rfrraThVToCHH4Vo3UpQE6cx5yGs8jnQ09M/L2RyQ= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 419a2d4f-aa02-44a3-04b0-08d49ee51bbe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR: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oG6ZtMBrFj1L5JFPLCOs=; 31:se+ehAJWQZrnHFUPe7m31ObLwCLZ4iccJurc25mrml4gszNv4CklkcuYKadMse3UVFCNLokiu6B1ldb/Diwv1DfuyhLU36UPjGQyz2DX94IorXQ9LmpyKblcZwabpwaXlgkj6bx1auHYT5rJyQAUBj0IhYj41FunEk6ub9b0HZ7CLEUE1o3hwmYsUPBBhMbIGZtKWk7TjUcf+Nj07YdTuZjnrDvBnSs2swowE+Q4X5yHOMMCLiilwltKB/HQMkho8w2ir8AQSad75yfLl+I3Qg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 20:ozJwQyACkHDPvie7EJx4ITqkbVH2Z3SxDRCStEdFt/ASJeJ6MT8dmReALEFcVx+ZTif5Aw1n04PfWFhWuDAmRZ+im2cacKnKwv3D2sNh7wOkG+g+Tt9fp7FInpa2kHCquxObhIhPJBIHmN6iIvOLGGyLJUCAYJK3f4YGh4KfGtGQcihResqmxCRpSDPgmZSXItxp01r8eyKAOeSU57dNUrYkhMRz05/GtllZCQRpViYZaGQpyItEwlbAiUpWxO+qfv+g3QqNfZkhRH7PyCWyFMG7uwfuriMa2EHTJnCZMhBwSEoNGruNXNGhKUPgFKgDtVFnAcfxzsBhk+vrLsNeC6/PLEtmPgSrozWjEQYbxfJ4J0CZj+OlbMh4fKQB8ZXeSOfzhaLVOHMGi3AplhalTJc60QrPRx2zVU+2ksyEwns4wCw7RLQrWsRd3lshpWQGqTalRBD9Poa5veJtQP4dd3oHN8pRqhxp0h/XYpy+U4GXBzK/sKJkDTfRUA2c9D+t X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(13018025)(13016025)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:BN6PR04MB0500; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0500; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 4:UsrfBTR1BjldhFLLdhkGB4vZ3tUj04YG2Rtx2iP61NMcBSAo1khSPNEkHDYRtdRrBOMho0QRwzhw05f8JLtZfr4BNlE7tAZ9LTdHZXYwOTuvRYug0C9KiCoJ5jSZXwh6n1AcZ2ChqxEEQC5RPWC1qHLm0rAs7GIhOhVQQ0difNx8nfBUQmUVuYLsgIDBIdPQmLtCYS5JfnD9G6LzFphlCTr3LrnAy0jaGggHwxf4z56mp1o37EYxQ9fvXWfJZW9xGfbaP6sroYdPbXee316cNvimfjFABs2m3T4aSQSJhx7eo12+ZOR+aAo+GL+mUJQu2yd/tQKnFBvpIk3C4QONcQ8lnXer5N9xgrgYQm5DSSvPjy9gWeB3q/IIYA8vJ14WlnX9kq2dN7NE02DrI95L0R8WgzAd1gdhQ6OwduuJ4PnvND/GiZ//sLuaNvxGRlczuXET/p1IYr4OtaR5G+iwHDZnAFaeR4ShnJpRmAprqjfE6/rbUWtEKDJ8xsN1w2WDKGfz2j5thOCo5NCgDOCL9Nx1faaWY+YWhhB+n9vcQ1TKpETmOa7MFBGxftPpVLDx2lcAmg/zV7i00IwMP2CmRbJa06q9XkJZBbNo4SWqfYupoTYiNDnSOIzidbYzVJV5nmPN261HxJhCliO5otoUU5XDqhaPdxhRG1yK7/flfYpV+aMgYRMivAj7a/4QKa/kVQI+6jtR9oYWb0/UtpOAH15srmB38KsM7g+u56lVxWEs3PFahuOTPu6z2ix8wnbIcdNFTshyNaa0laCKgM/egNdsLA/CfHlMR4dBLp9+I9ksVHvvSjIO7e/P/yBem2tuzOO40WJMFxUYYPgA4jurD76qVLeaQ3dyOJettsTcrmfdvezRseqQcaVhf/q5bvFo X-Forefront-PRVS: 031257FE13 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04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KyGx55mUfo5HxfZwQM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 7:1cbnlvqmQ8EPrFmJqDQLrDoY2LN3R8A56oUk4wsrFipayfgLAkHHLpiZzJ9Kmpa+dldT+A6V1932H/QBCA4ZyRm1egsO2zOuH399hZkqWWvCji1+K0MDIzzbCQjWQSxqgL6Jb1Twr4yMHwsfVecqg9z0Nyp88BlCzrgk0SR9EgAtbQZjjXCjqY+7bcFndfzaEeaUKcBEptBGb0aHUp9FvAcNV6EOb/DpRLU8HO9c/rqtqPxkisO8eziOIenT4ZfO7vsQC6K6oof1BeCqrIvgKcCdyPO1p478Wp3eUlFsSIH0mYOs3rF9Gm/27eGMhQs14UUIFXNu6qCqe2Yv2+1oNg==; 20:0FEykfrLwG0TKMfOh6GVM3cmGbBlltKhDVijBS8XZEpjrCB4vvuJ1OlEMeci4oAtvfaU2KMItOBIfRIYEu4A59oLwp1VC3+V7DDwziSQz9jHy4usYhWIMxHPqF1G7CrOfp7asoDRq0EBSZJekJ7nmzw/2CHdNwffIDVikJtNCw4= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:21.1379 (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: BN6PR04MB0500 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This simplifies the memset() call in scsi_initialize_rq() and avoids that any stale data is left behind in struct scsi_request. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index eeb668935836..791bae192bfb 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1160,11 +1160,9 @@ static void scsi_initialize_rq(struct request *rq) void *buf = cmd->sense_buffer; void *prot = cmd->prot_sdb; - /* zero out the cmd, except for the embedded scsi_request */ - memset((char *)cmd + sizeof(cmd->req), 0, - sizeof(*cmd) - sizeof(cmd->req) + dev->host->hostt->cmd_size); + memset(cmd, 0, blk_queue_cmd_size(rq->q)); scsi_req_init(&cmd->req); - cmd->req.sense = cmd->sense_buffer; + cmd->req.sense = buf; cmd->device = dev; cmd->sense_buffer = buf; cmd->prot_sdb = prot;