From patchwork Tue May 23 23:48:49 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: 9744469 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 6B4626037F for ; Tue, 23 May 2017 23:49:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EC0228818 for ; Tue, 23 May 2017 23:49:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5374F28854; Tue, 23 May 2017 23:49:52 +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 962F128818 for ; Tue, 23 May 2017 23:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031653AbdEWXtu (ORCPT ); Tue, 23 May 2017 19:49:50 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:11780 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968827AbdEWXtc (ORCPT ); Tue, 23 May 2017 19:49:32 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21096484" Received: from mail-cys01nam02lp0050.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.50]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 07:49:11 +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=tA0i7gKC1KtHUYBJJZX3qoXd935O0zFor1oGuUwioGs=; b=TdZsTQXJ0O0DoAEjwJrm2r3O1YDhFYZsoM9TLJUJcutENJ1EV3SyHGl8rUqqB6w6HUXYz2nddzw2oiwWqr9w/K2fF3SCVpd5Oxcpt78hCWwZLn5iqcTeDzbYaCXLHsaB9LoqLlwd5932lXsy63khp7QXbXma6p1RjTQ2jWWAQUc= Received: from MWHPR04CA0062.namprd04.prod.outlook.com (10.173.46.24) 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; Tue, 23 May 2017 23:49:08 +0000 Received: from BN3NAM04FT062.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::205) by MWHPR04CA0062.outlook.office365.com (2603:10b6:300:6c::24) 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; Tue, 23 May 2017 23:49:08 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; suse.com; dkim=none (message not signed) header.d=none;suse.com; 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 BN3NAM04FT062.mail.protection.outlook.com (10.152.92.212) 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; Tue, 23 May 2017 23:49:06 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) by (Symantec Messaging Gateway) with SMTP id DD.D1.45291.07AC4295; Tue, 23 May 2017 16:49:05 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 16:48:58 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-10-5924ca70012d Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 73.03.18148.A6AC4295; Tue, 23 May 2017 16:48:58 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Hannes Reinecke , "Christoph Hellwig" , David Disseldorp Subject: [PATCH 28/33] target/iscsi: Simplify iscsit_handle_text_cmd() Date: Tue, 23 May 2017 16:48:49 -0700 Message-ID: <20170523234854.21452-29-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170523234854.21452-1-bart.vanassche@sandisk.com> References: <20170523234854.21452-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsXCddJ5kW7hKZVIg9WTWSy+/p/OYrHgzV42 i5WrjzJZtK0+w2jRuvQtkwOrx/3tR5g8dt9sYPNYv+Uqi8fm09UenzfJBbBGcdmkpOZklqUW 6dslcGVc7DrAWrBGsOLM+kMsDYyfeLsYOTkkBEwkmm+2MHUxcnEICRxglPj56zw7hLODUeJd 7wZ2mKq2m4/ZIBIbGSXu7L3MCJJgEzCS+PZ+JguILSKgIzHr7guwbmaB7YwS16e8BUsIC7hJ vH5zAqyBRUBV4tXBuWBxXgEHiR97L7FBbJCXOLtlJzOIzQkUX7lnG5DNAbTNXuLyd2WQmRIC 01gl/v86CdUrKHFy5hMwm1lAQuLgixdgvUIC6hInl8xnmsAoNAtJ2SwkZQsYmVYxiuVm5hTn pqcWGJrqFSfmpWQWZ+sl5+duYoSEe+YOxrtPvA8xCnAwKvHwJjioRAqxJpYVV+YeYpTgYFYS 4V2+ASjEm5JYWZValB9fVJqTWnyIUZqDRUmc95zM1AghgfTEktTs1NSC1CKYLBMHp1QD45Uj QqutVSeItklvtAmUaXoh7ygXsXnFnU2PfxmXr8sV/SbrJqe/zlBuSs41t0nXV7y9wtqywf7j hFxhn2/bZiWIrktcYCd2Yx5fn4zpFem6e/xBOewzP5/ZwhWSe8lgq+KM0v3T/M511blun7FR IZLBJyZuhcjUOT0OogtdM1n2r/TMnyDToMRSnJFoqMVcVJwIAENVKNBzAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPJMWRmVeSWpSXmKPExsXCtZGTTTfrlEqkwbn/VhYHf7YxWnz9P53F YsGbvWwWK1cfZbJoW32G0aJ16VsmBzaP+9uPMHnsvtnA5jFtzXkmj/VbrrJ4bD5d7fF5k1wA WxSXTUpqTmZZapG+XQJXxsWuA6wFawQrzqw/xNLA+Im3i5GTQ0LARKLt5mO2LkYuDiGB9YwS jzufsoEk2ASMJL69n8kCYosI6EjMuvuCHaSIWWAno8SOM1OZQBLCAm4Sr9+cYASxWQRUJV4d nAvWwCvgIHGs9TATxAZ5ibNbdjKD2JxA8ZV7tgHZHEDb7CUuf1eewMi9gJFhFaNYbmZOcW56 ZoGhkV5xYl5KZnG2XnJ+7iZGSJBE7WC8PtH8ECMTB6dUA6NBpUygp+2OgD/vt92/9m/tqWQZ Ka8rE9Y5NDRde73tam0Yh5zgsoNCk1g2mOQd6uBh9/bj6FLf/H4Sh1pby77Jd9aXl+T/zRCU m/Cjoz895fa0wC+qPz1vbsmK61G9+mqKwK1551r2aXv7yC31tp5o92Lte6mz9oK7D3xmzGzI +f3/9Ns2aV4lluKMREMt5qLiRAC23b73wgEAAA== 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)(39450400003)(39850400002)(39400400002)(39840400002)(39410400002)(39860400002)(2980300002)(438002)(199003)(189002)(9170700003)(110136004)(6916009)(356003)(77096006)(81166006)(2950100002)(50986999)(76176999)(8936002)(50226002)(36756003)(4326008)(1076002)(478600001)(8676002)(106466001)(38730400002)(189998001)(6666003)(305945005)(50466002)(2906002)(86362001)(575784001)(47776003)(48376002)(54906002)(5003940100001)(5660300001)(33646002)(72206003)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0500; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT062; 1:/Zzt1LOiv9NZ5yU50tRIO+AOsW/ASuGoaThISjUf7pH/j7TC3PE8QriGFEHzPZ4OL5gTpbkaMm/DRYunqRioiCECZKGNP3c0/3oe91VkHtokKsU2tYJIjZGvnTIY4Z/Igrv2wxpG+gyiNpgUOQsg0Rc6z8+dAH9Sya+ioKj0dtcySDMUItuBRXqS1wTmwatuHikzmdUqk8q3aH+HbENlnvrXmJrG413GER9RQ1+M+axKfBPNNXY9EhMYtxbZQZv0kGNRwCYQTPypX1Z3cfBMP7E9DKPoYu3LjnSmDu2MDVlKaZcI11fX50BYKEMs+OfCw7uWGyQ1K/yo3723imYso+UVubw8e6cd6L0/EKq56SjgoyL9Wh9oxuI4msF8GtTN1Hmz5HEJ4TerL0YI+wNWP57ropKkn436nU4HFRE+cG6IChWuhlUuucDwSinYQPkYprOFbPGaZS2bmiiG27kRjmdxNbIsQ3TrjPyUmtmDLsrxuiXMnM/vSnmg5qxsSv0V1WdsmYu526fDDzOL4c83xWyAOlOSCpKSpKzlVVkRJA8= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bbb7452a-d905-4419-4b26-08d4a2364d24 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081);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6/ojSTHvblZhsTk=; 31:4bh+R8LwtVOTapHRbelqlo/xtqJt9xtMUsBhQFfryCO/lY+rixW1Apb+v+XdXGhU2ADQMGMbsp3EOZgBU7xhLYKYOolUabfvgv2+psQyHeBrbSNwsXX/Upk9lHx2ieZf160H3MhcBz3xmr4S6aoLMyVXsD9/5OPkbOS1Rw5ixtVwIGGVJZ4UXBeT9wIGSyVcXJ/xmFDVPvJe1/Zq1D4e5qn28b0Go4M1z0FLG8yOkE3cCM4khjpVdGP3ZTNrsXIdQoQE7x4eLFjj4Jk5cktlPw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 20:onBhzWf0X+iODoNdv6QKOsQ7cZ26qgS66b37gxdFC0oLKfXVpKFQTH3OLom+jLsX9YTqPIRax1grsq3VR1BTFuSe4rDKCcj3tUOUV14Pjs2pdQc1l+RmgVT4YyOjm9Z8ewhxuPZZyAqlZwCPan5KIHBoVnkmP6NmnDVxbknmQAp/q80sBlOII6k2cndvAf2vpJXAXa+n3GzcQr9tuzd9NxpfRETNw7Kz+4cKdLAXOK2QwguvHpnrePAh6uvGCljoUWv7Js9Vpe7w9PCUO0o+Lj9cXLx7Gzn7l25kkSoFO3jD+Oi2qRIpkqh9zHa4xpEC/lLxcK91qb1qKHt49ge28eeNXUutM+Rh1IGYacEab8WAqZWhDgVwl6XqELyP6gyzefbviRhGt/ShWDZfBrNuig3VEBkWPo5YfP2t3gHPW9VIRwcqglUBlkZ0y4/ptepa+aKbxpRwARyaxRZnAzWPQ4TI7pXRoaWazijbXiBf6VoylTLZbTsWQNZgUbUaU1nK X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700051)(100105000095)(100000701051)(100105300095)(100000702051)(100105100095)(6040450)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(10201501046)(93006095)(93004095)(3002001)(100000703051)(100105400095)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(6072148)(100000704051)(100105200095)(100000705051)(100105500095); SRVR:BN6PR04MB0500; BCL:0; PCL:0; RULEID:(100000800051)(100110000095)(100000801051)(100110300095)(100000802051)(100110100095)(100000803051)(100110400095)(100000804051)(100110200095)(100000805043)(100110500095); SRVR:BN6PR04MB0500; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0500; 4:XUphhDjQHOTY1pWaKfw8etRhSfELfyQ7//e3+I74GT?= =?us-ascii?Q?GTTcyNZgSVbG4tZnolgwoSeKJC8+FRQMsokMgeD/tH6EkFM3O251OK3DjyhC?= =?us-ascii?Q?ur7sGo4DKwUqMCYiN1x4Tl/gooy7lkPW8mz+i6p86CFzRgnZ1g8GU+9c4QZE?= =?us-ascii?Q?Hl0ELAyPN30w7TSfTUNBqrtTxjHUz2Itm/hZDwRlGMZDEzNAexfVJqKk5ZVy?= =?us-ascii?Q?fcwIvRaVI0wiYKLgBFgsQpL3Pe4BFp3RbfZRr2O74QTFiVLahWiz07Xf0cmN?= =?us-ascii?Q?m5cn+ttN1mKNeZT7HPMkK2cnnDTz4M/RiH2EVNeHbeMOhp5I1f5nVfq0Bn0D?= =?us-ascii?Q?8r8mzC6q0sX8zUZfmrPXBPbHOCV0eSyN4zRzxeapofDum5JlmkyA+dHv9QFe?= =?us-ascii?Q?sgKKrGofxixdlqtX+stMri97ERKVVzoBzNWYwqtI46xsuyuc/vMQDWX8TX7w?= =?us-ascii?Q?Da1SgzjLQghqJrozjrP1Tl9LZLkIVVwfC/SU6BMaH7BMj6YvIK6mgaivefag?= =?us-ascii?Q?T0vLxg+Rp57fr7VOUa6s0hgbcdbb4v0x/3d1nXX+hbGIoQodbkbcgiNxRB/+?= =?us-ascii?Q?uLezUyKCuwNbKdbaNFVDZk05CwWRBxUjGFij5dqMSXC2L7XBPUaCM+9/vZX2?= =?us-ascii?Q?RghYM3fyBaZyfZK1C0GSgmRBL1CJgecHN3gmSTpisfqVOvKeLfmWR9jLZRHN?= =?us-ascii?Q?T02H2Oh26OWyTSPXQ2X7y5xLliGE0VyXajrdaSnaHAcNdujWLIpMpWcBcLjW?= =?us-ascii?Q?IRQiGqz0BG3gYOQfJ2ajGU0j2Ob/6SRRPhfbqSj3cBIb0imcZzvs4z2u4e8s?= =?us-ascii?Q?EmRnH+3PSOimcdLyuF7Fu6K2KInD+DXFW9n9H0Z4MVqa+/BNfKhMAoKoDRRB?= =?us-ascii?Q?X576kbc+BhrgJQGum6I3XZO7GjYeWIvmb7BpoJ9Q1djByiMwGhAoCE6mwzUK?= =?us-ascii?Q?LOLYCLY85gDioZ4Pv26AYB+6XpJ/FMlABVQwBeN0TufdVbSkYEN739HgRKsF?= =?us-ascii?Q?xatoA1bdxANyYa3+GWGIS3Q/N4B2RV10iLWix7yGzYOEiu25LgQ3PLhka8LP?= =?us-ascii?Q?lasfWx1t7xDCCmK9/CZm+G2wKbj2Kma/YboPXvzHQr31XKzcGbRHZpqg6BgU?= =?us-ascii?Q?Zbz9q4DoyxILdsTN937TdDG3Hi3I0rheuSuOci4bCHuU9OfykKc9cwbBBHJX?= =?us-ascii?Q?h1F8yz6B7zr2aEIEp/6hY4j3CBl5OVe12wjAA6VD0zBCs2OoGMDiHaqyr25B?= =?us-ascii?Q?Vy5qpIkSsCNe2nF9w=3D?= X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0500; 23:0OWI7Nfmy/PHQIA0vB03Qt4J8z+dYXkDrJdY+CQda?= =?us-ascii?Q?CnS1PSsiUNj/ygJO428fuziUbjNM1e1/tPy1OxF+FZje6s5a9qm9dEzyMF4X?= =?us-ascii?Q?Low3obVimUSltxDbmqvL7L1633MGh4JqSBM+MlEhTEx7coDJ7WZQmr416Fqq?= =?us-ascii?Q?JkuJQamAse/1UlGdYq0DmYl+IVPp74lmc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qBDTy6brS0GHsEnnb5zSCdUsf787FOR/YpYpT36M1QG/YmTcxyznCDdJY2FYyGD2mPVv1Jx3Zxy1C/NgEx+hWxI3Ao9g4Skz7BuPqoB4p6dmR+/cA9Zh6oBEGCCBhbbQWehYIBEfo2FsjITjJoFXAgwNIhzG8; 24:b4VDRlD7gz2ScF4Ftz8ffHJtglLTDa3h2o5+wrquJ0+0ugoSuofnLCg6A/+csvRnSdogLWHLRcp3tCUUD41KG4veJ+aCozXLDa8dXmisj88= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 7:2HStewNN/kpZhEQp68RrY8Ud8NXIYa1gXWQetPV/LbDDRBu2zugXjV3BH7i5QAY2L1Q405X1Ma/XMUlg1BgMIbUb/LiILQfQuaHid9Rty4XUIUthfuf3NKhPvmk2DeZt22K95ofVoF+ClDmN7av6upgqeFuvbfVJZNaPV+jVr9KrXiTm/24sch7jiWQb6QjnWRrB+KM23DR3Z/zMO3fWHqHRU0rkHDBpziL3jwvQ+qXod3Y3NZFDcF6jmyVmsgALqFyNBBLy5C7RofnkHqTQaqMxbMoJXYsU61xIqfDE1r3h4/nb98mHKkcQGNNMOLbAV0fhfD/rUO9bY0EF+sMjwA==; 20:oncsd4xcZFawv4Uo20ggj+G9QTnKEmBto++F6XxoIQjXPGx9KDkGPzoZ5wjX6Evijb+aZJdShazQ88Ospfta81PjmjGL4TlCTwZgpy+CyT64WSkXCqKolFNpzdulVUbYcKSbtaEnZBvWTSYgiDuXgwf1V54NQv32pTO8kbooF6Y= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 23:49:06.7396 (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: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Treat text_in and padding as a single buffer instead of two buffers. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: David Disseldorp --- drivers/target/iscsi/iscsi_target.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 693ec219e441..becf0e9259b2 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -2253,28 +2253,25 @@ iscsit_handle_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd, rx_size = payload_length; if (payload_length) { u32 checksum = 0, data_crc = 0; - u32 padding = 0, pad_bytes = 0; + u32 padding = 0; int niov = 0, rx_got; - struct kvec iov[3]; + struct kvec iov[2]; - text_in = kzalloc(payload_length, GFP_KERNEL); + rx_size = ALIGN(payload_length, 4); + text_in = kzalloc(rx_size, GFP_KERNEL); if (!text_in) goto reject; cmd->text_in_ptr = text_in; - memset(iov, 0, 3 * sizeof(struct kvec)); + memset(iov, 0, sizeof(iov)); iov[niov].iov_base = text_in; - iov[niov++].iov_len = payload_length; + iov[niov++].iov_len = rx_size; - padding = ((-payload_length) & 3); - if (padding != 0) { - iov[niov].iov_base = &pad_bytes; - iov[niov++].iov_len = padding; - rx_size += padding; + padding = rx_size - payload_length; + if (padding) pr_debug("Receiving %u additional bytes" " for padding.\n", padding); - } if (conn->conn_ops->DataDigest) { iov[niov].iov_base = &checksum; iov[niov++].iov_len = ISCSI_CRC_LEN; @@ -2287,9 +2284,9 @@ iscsit_handle_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd, goto reject; if (conn->conn_ops->DataDigest) { - iscsit_do_crypto_hash_buf(conn->conn_rx_hash, text_in, - payload_length, padding, - &pad_bytes, &data_crc); + iscsit_do_crypto_hash_buf(conn->conn_rx_hash, + text_in, rx_size, 0, NULL, + &data_crc); if (checksum != data_crc) { pr_err("Text data CRC32C DataDigest"