Message ID | 20170524003420.5381-25-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Changes Requested, 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 71E0A602A7 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 24 May 2017 00:35:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65D3628867 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 24 May 2017 00:35:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AC342886A; Wed, 24 May 2017 00:35:27 +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 09B6428869 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 24 May 2017 00:35:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765690AbdEXAfZ (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Tue, 23 May 2017 20:35:25 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:5769 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763368AbdEXAec (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Tue, 23 May 2017 20:34:32 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="19885596" Received: from mail-co1nam03lp0017.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.17]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:34:30 +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=KSbKLb5ukcf6+y+BjhYSr599s3AH4/yj+MqUCQMmQ84=; b=eNrMBv9g+C/a8hgAXSgzAXKb2r8CKo670Da9cymZ+ps2U931f81AiTXpS5S+iY8Q5Gir3zt9DJzW3yjoLa19FoMUVDRmk5C3X6TP/Mw9N/3wIuL5hzEP9/sT/se4s9hDe8Bv2Who7eeHMA5WxkpiPU2ryFOWOab0vY3WfB6jZ1I= Received: from MWHPR04CA0033.namprd04.prod.outlook.com (10.172.163.19) by MWHPR04MB0511.namprd04.prod.outlook.com (10.173.49.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Wed, 24 May 2017 00:34:29 +0000 Received: from CO1NAM04FT032.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::201) by MWHPR04CA0033.outlook.office365.com (2603:10b6:300:ee::19) 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; Wed, 24 May 2017 00:34:29 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; 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 CO1NAM04FT032.mail.protection.outlook.com (10.152.90.130) 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; Wed, 24 May 2017 00:34:28 +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 39.55.19026.315D4295; Tue, 23 May 2017 17:34:27 -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; Tue, 23 May 2017 17:34:23 -0700 X-AuditID: 0ac94371-41ba798000004a52-35-5924d513cd94 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id B9.A3.18148.F05D4295; Tue, 23 May 2017 17:34:23 -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>, <linux-block@vger.kernel.org>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Hannes Reinecke <hare@suse.com> Subject: [PATCH 24/31] scsi: Make scsi_initialize_rq() zero the entire struct scsi_cmnd Date: Tue, 23 May 2017 17:34:13 -0700 Message-ID: <20170524003420.5381-25-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170524003420.5381-1-bart.vanassche@sandisk.com> References: <20170524003420.5381-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsXCddJ5ka7wVZVIg5ZjWhYL3uxls9jYz2Gx 95a2Rff1HWwWy4//Y3Jg9Zg26RSbx8ent1g81m+5yuLxeZNcAEsUl01Kak5mWWqRvl0CV8av 7fPYCm5wVOx/+oatgXExexcjJ4eEgInEkVNnmboYuTiEBJYySdxfuY4dwtnGKHHr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+/cFvwXAbGc2GJ+1f/sqf me6Sf/LWvb/aNmVVpnffntXwnrPKwWdWQSU/y02vg/GJa7d/erVK+FvVna2z3K4wnqr56Gn4 lnHHZSWW4oxEQy3mouJEAEtHddG6AQAA 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.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39410400002)(39850400002)(39450400003)(39860400002)(39400400002)(2980300002)(438002)(189002)(199003)(9170700003)(47776003)(54906002)(50466002)(48376002)(81166006)(8936002)(8676002)(86362001)(2906002)(38730400002)(53936002)(305945005)(77096006)(6666003)(2950100002)(50226002)(5660300001)(72206003)(50986999)(478600001)(189998001)(5003940100001)(1076002)(106466001)(356003)(36756003)(33646002)(4326008)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0511; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT032; 1:65S1h60LTkR4F4/K84+OnYoEJIiVcEcmTNOU9UGyEQrnDw1vx6u3gqfLWW3X/iPyu9UCTWa2vna6IF/jTB5jJ499gdP9RX9tQTgQaIx8A12g3wGkhJNOPrFhRjGzaYK7JdTUrR4p+JpPUGL049DdoKeQZtiBvLSHFtbr+PgwaR9faLCLAO5OSI7bk+FATpEF46j6msKMPaB3kBReFZvBVGuUVRfY8iFFJ2VwnGvuNvgXIXx5jclLRTnBicvd72HUucE+pVDP+hK/B7GYjvKCmwDfradEbgAX20xgsvBO55u+fmU49RwI0bT6QfJ5xJ7qrTzZYJ5yaFUgHGHAAd2QV8QgvX3LmaIEc52qoez9fBRByf/slbCg9yvoi+bNK6rl4EfnT8MFUf2xZYEkng7NdlLv21jOy5KaOBzv0SmbVXjdc8ucVKzUHaERGYJxLPd405/qeyCg58OPL6SQPgQMx3MWpne61wc+kLvdsJ9gnXSak7b0bIi3k8H8LCNyM1CL X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0511: X-MS-Office365-Filtering-Correlation-Id: 0aa38d90-8c55-42e3-9fe9-08d4a23ca366 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0511; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 3:EGG4lEAOGkJyBhs9eajj+QjjNToioTP2hMVFbTeGdIqp7iMNtUjF6MDpV0YJ7KBrIyINWCGIXH8M0DAVkmvkRZpRwXN/Mq8J3UhlgTExx2N8jSc8l1PFoMao69eKyhjqbIX2iJpdn+qxfueh3mFT52nzMsi2A4kStfJJg60G1EZ9Haiuw61OR7rzL/hrw5sBocCojbMoy8SzWcknLLlslWXJI6KkD1KwAt3C7WJYjVX+rY+1tE0xKr9CbNWQm13+dXsCM/iK9U72QXIchknFfWCmG4OYRRLCHjVNiaTxPnWQx4aZHTZaOPrRsaJyY+FLNMqpBGzEvtR2jtMyCUzj/NdhOEIXctN79BOCYqaBrFmdoX8UzWg5y0Pa9WKyEdrwZwzAAxepxuR/REMAEKOdi0tAoPXVYxAap9IPwgm6haVRxaPQaRkdE+lvFJGcVYDJ+XeV5CqKNpNUWq+IPorocRn4OAuUQhAvLt3JUWkbE2x/WcBDPY7fg7V73Epju7An X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 25:c8KlVnlrl6rDKvO+KKdLM+6HZEyQBX3cQHwshK3bSFD+7oTdZYM0SDZ12KBfPZfJYKZJQMShMnPD/mile3Cpzoulq9+kaXdu+Gt6ArHbVqDItWNjdrFy/mjsh67OoQkiS93s88WLAPjQPSfMEWiNb5ZvE2jFyDaYBhPUYRtJpqe/AE5eCH473VUnQax1hmXZUo6kCJsvPjUYuJTzFKmZKBu6278rEa4zpub1W4ja5xPsbFZWd/ZmZOMW4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/eB5WLgah32PJE X-Microsoft-Antispam-PRVS: <MWHPR04MB0511F3D64EBF6086B80A4A2381FE0@MWHPR04MB0511.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:MWHPR04MB0511; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0511; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 4:JlzmC1aO6xHGrleYHKRDmZEnOaJ8sTKQlmk4aag6wbo5lnlMZiS4pexkJ45G9lubUH0mqd+roOaC5a5RT9n7DJ9mXrRliSSPqmlNez8An9xCo7xVbsXvup8H8phTDeO8SYBAfGfy5qxfjresqkQC40XIcsxqUB6xmG3C4/0QdHvqg71sj7RqkFLqpjUX+FGWrqU1PFTcyBRRJsmzlA8QzeFgdBR75oEAi7RSjKUmneaROphB+/LLiPzHIsbaLrlcjSK7vNWDuAuaiZlLIZOe3asDhvlK77KeSgSOdLIsn1icbbT/+kwEC5v6a2KuXReWqVhTSgRuqCiHYA25+oWNhKitIDyXMg/w1z/Ca83qasw1EQy/I3u/8MbLA2/nIbPB9Y3VOX2gywYh4v/9haUMX4a7OTWbPtLxiPt3yf9IwRpXDMr/w08ejeRzrMwCCykLIr2nVZbwPZocxbnIj8N10LMbtmE1SG1UO52GScJcdwZe373lqmwvSN7x4WarYCQkal71PAi9aYRA7cbzEJzvlb/Oty83KbK9eJqgXUelV6ZWuw/PFflRTckWtF/Z1a5IB0PXh+RFZsq83J9yWUCHRxv7GeJNNJFCZsg+Q6pEgeiEcCtW6Vjp88pdUMljvRLhK7l1KnZ2R4aCLOfEUPQ8NB2mSM+bbk+6TnVSfWnaKHdD1JKpy6I2xG/gSJq2Vk8EBgBy3RS2SjoYXT1YJ38L1arjk5MGQyS9GFRjSvbKKPNcNwbVlRtogNdUs0kxiXHYnLtVRIZKoExPgdSHfRx37r3Bc54Bn8J4glb4O79L9dGOv5hfDMK6nD5w1vHeGc7PNslqEv6t8bF3Yeiu38gOCAtqswlCDgN036K+F8nterUtNpMK18E7bdgkQyW7pg0N X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0511; 23:7teor1aHSlkKves20P3wqmTaVy6YofMsbYRn26buo?= =?us-ascii?Q?YXpXORyrhC82zylpyD5muxM+pbaC2h4FpkWDgYruSJc9K9dPyn+wj43xYsFG?= =?us-ascii?Q?MjLpcV9M5ts4NFMtnkHl8HpBPss+krFpVosY4suLo5GJVKOA8ITUF97KkizG?= =?us-ascii?Q?+vq2OkuaebLUwUCRlrPY9vvaE+tUlfI/zNEGTqEQZkrTnaveWdXQFRbQbhgf?= =?us-ascii?Q?8eEWWITpzBZ+/cAZAxvBxDDLvfrDaKinVEWDQodqAAe7RdjDC8cvjyhWppnt?= =?us-ascii?Q?vt9x1ZYfovgzARd82kegdGs0k28BEMoItNnJSTWsVXpNrGP/s75I7Urouquz?= =?us-ascii?Q?0OI1094YE7z7oQrtw4dXrRD/Pmgyod5MX8hjvIzMEfuIAL9IxxLxq/+1jI6x?= =?us-ascii?Q?cXUg/CXtWncckbR4BaUtSZ0Q7e9+ehIAdmXNJfdo5p2ae1DT/ToByTmaGowx?= =?us-ascii?Q?bKp9FLkQ/5JJo+OSEtvm48pqGG/S8w4xy9dvE+lwzigsAqTqYrjgkPhbZJJc?= =?us-ascii?Q?FN3RIHszBe9l4bF2I6Q5+/y2hKa0Y1B6+y57JgCk+IBDK1dDgZ+8LD3FvWs0?= =?us-ascii?Q?Pd4MwH344Gt2o85oQ8vp1r8cHq0wfRJML0A0VJ3Ml/rq2jJvZIHp3lswqq69?= =?us-ascii?Q?Hki8cA7UP+x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k7nDMAzAWc2BZcStWkgHZM1r9MiZ4=; 5:Xx7kQUVzUw6k3DL8KyuEy6oEO2JptmExKfyh6QDAXa+V8KQinoJW4U1aVYbVoIZplm95jpA4lxmUoL/ME34/uzIhhu7eDYohsvXHgZMSwlqZaaCeAhY6ut2zr+R/F+EuuTpR5DTYus5uY60iJNW75A==; 24:GBLeHAe+KQ8nlC0c9Ye1FH/JcDcSCD7usD3SLkK8IY4kRhMn08hLnaCNKNHSd3kqa15ApJz4VwAOu+F2wsjf2fsn0W73yxiZaru6fviNplw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 7:8TaA0ASjYtp3Y8ZFccrWLHceBz+gFuAS0738WFwVzRQLFAAaJ7fdmw+FuTsj3BI29kY01Xh+932Sg1DD2mdasgcnvReZpHVry4UYSR03HRtKujGIb5wj9jXf1FKm9Skvj98iquGcfxv9nQyQYSphX5U125VytAOMg4dtoB+lpRdSG9QotVhSisdSwU7auIE59c9OOOZLLb/XNZdm4v4vaB9RK+OYDvZ2RNwuItRIIF7gC9LjngiuxE2zAc0fU6Uk9ChCyBvn/5sa7Hwg0lN0muu4849RfHk49aFKDm7gaSvS2sXzdYcJV/3YlvIj+1YNHszaXf3Ffmg/Q3Lni5M+rA==; 20:SLjqJnYnuUcQ6+8SROXaNWdwepy+5HKeYcUhW1eRiqUAHLpegPYy1N/HWmUWMVFBEHDEPlo6HETGwGJm/fdcUq+RIyZrfeqQAVY2ZuXN5A+Xcwm3m14YAJT13WQveNFzlsIfOR2w+gCE4gl5VoNIl3NhE67onJTYAceVCltLZTQ= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:28.5950 (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: MWHPR04MB0511 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 |
On 05/24/2017 02:34 AM, Bart Van Assche wrote: > 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 <bart.vanassche@sandisk.com> > Reviewed-by: Christoph Hellwig <hch@lst.de> > Cc: Hannes Reinecke <hare@suse.com> > --- > 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 10c6adb208dc..4b24c45fa113 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -1159,12 +1159,10 @@ 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)); > + memset(cmd, 0, sizeof(*cmd)); > scsi_req_init(&cmd->req); > cmd->device = dev; > - cmd->req.sense = cmd->sense_buffer; > + cmd->req.sense = buf; > cmd->sense_buffer = buf; > cmd->prot_sdb = prot; > INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler); > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 10c6adb208dc..4b24c45fa113 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1159,12 +1159,10 @@ 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)); + memset(cmd, 0, sizeof(*cmd)); scsi_req_init(&cmd->req); cmd->device = dev; - cmd->req.sense = cmd->sense_buffer; + cmd->req.sense = buf; cmd->sense_buffer = buf; cmd->prot_sdb = prot; INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler);