From patchwork Thu Feb 2 00:58:34 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: 9550901 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 F1E4460415 for ; Thu, 2 Feb 2017 00:59:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAF042844A for ; Thu, 2 Feb 2017 00:59:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFE462845F; Thu, 2 Feb 2017 00:59:18 +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 6107028456 for ; Thu, 2 Feb 2017 00:59:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751369AbdBBA7R (ORCPT ); Wed, 1 Feb 2017 19:59:17 -0500 Received: from mail-cys01nam02on0086.outbound.protection.outlook.com ([104.47.37.86]:16058 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751371AbdBBA7G (ORCPT ); Wed, 1 Feb 2017 19:59:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=aQAjkX/B2/E4Uw/ounlOZZLCAwFksUsyxY/QX8ea+kA=; b=f4KSuFTELVMb1DJAmJtZaNPeSate+ezEf/JSmBtmcDlAGWscGc6wMPlCokVSz9UHsfWOje1GtfFPL+mH6QOxFtjZMGeAxxF79EdQ/ZZFLHWUts8jnmXX6SIfYycHS2C7UYp4W8oNzaeO2IWjcEaHfsvPa6jaPVxN6H+LLciBnA4= Received: from BN6PR02CA0061.namprd02.prod.outlook.com (10.175.94.151) by DM2PR02MB1419.namprd02.prod.outlook.com (10.161.143.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Thu, 2 Feb 2017 00:59:04 +0000 Received: from BL2FFO11FD023.protection.gbl (2a01:111:f400:7c09::179) by BN6PR02CA0061.outlook.office365.com (2603:10b6:404:f9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Thu, 2 Feb 2017 00:59:03 +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 BL2FFO11FD023.mail.protection.outlook.com (10.173.161.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2 via Frontend Transport; Thu, 2 Feb 2017 00:59:02 +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 3B.7C.65426.27182985; Wed, 1 Feb 2017 16:46:42 -0800 (PST) Received: from milsmgip11.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; Wed, 1 Feb 2017 16:58:57 -0800 X-AuditID: 0ac94369-b62949800001ff92-36-58928172bab7 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 8F.63.16817.15482985; Wed, 1 Feb 2017 16:58:57 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Christoph Hellwig , "Andy Grover" , David Disseldorp Subject: [PATCH v2 17/36] target: Fix a reference leak in transport_cmd_check_stop_to_fabric() Date: Wed, 1 Feb 2017 16:58:34 -0800 Message-ID: <20170202005853.23456-18-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170202005853.23456-1-bart.vanassche@sandisk.com> References: <20170202005853.23456-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsXCddJ5kW5R46QIg1/brSz2z3rGZPH1/3QW i5WrjzJZtC59y+TA4rH7ZgObx/t9V9k8Np+u9vi8SS6AJYrLJiU1J7MstUjfLoErY8HPz2wF 8zkr5q3Yxd7A+Ia9i5GTQ0LARGL+0u3MILaQwFImiW9//bsYuYDsrYwSLefbgIo4wIpeN8dB 1GxmlLjZ7g9iswkYSXx7P5MFxBYRMJD43XuBEaSXWaCDUWJ+zzNWkISwQJzE+W8NYEUsAioS jy7NBlvGK+Ag8WPpbDaII+QldrVdBKvnBIovPg4xVEjAXuLbn6MsIEMlBNpYJU5tWM4C0Swo cXLmEzCbWUBC4uCLF1AfqEucXDKfaQKj0CwkZbOQlC1gZFrFKJabmVOcm55aYGiqV5yYl5JZ nK2XnJ+7iRES1pk7GO8+8T7EKMDBqMTDKyAyKUKINbGsuDL3EKMEB7OSCK8vMCqEeFMSK6tS i/Lji0pzUosPMUpzsCiJ87561R8hJJCeWJKanZpakFoEk2Xi4JRqYHQWa1XKnyA6/a5Vq9ke v+0z+x7NLV32TsCBv0Hm7iS5CNOGVs3MdWvaIxfczbkUGMee3MJ4ILHmY8Jy3Yqn9zczzZa2 sjNRZLkQfL7AZX7VijXTlj7bnRPemanxQ2GbtUnv3QUnV0TtU1NgvrXd+hXbVav78V3ewmKK u3S3fohx4IuNElt0QImlOCPRUIu5qDgRADwnaExnAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKJMWRmVeSWpSXmKPExsXCtZEjRTewZVKEwaO9Ahb7Zz1jsjj4s43R 4uv/6SwWK1cfZbJoXfqWyYHVY/fNBjaP9/uusnlMW3OeyWPz6WqPz5vkAlijuGxSUnMyy1KL 9O0SuDIW/PzMVjCfs2Leil3sDYxv2LsYOTgkBEwkXjfHdTFycQgJbGSUuLXpCVCck4NNwEji 2/uZLCC2iICBxO/eC4wgRcwCXYwSm86cAisSFoiTOP+tAayIRUBVYn3bdFYQm1fAQeLiNYhm CQF5iV1tF8HinEDxxcch4kIC9hLf/hxlmcDIvYCRYRWjWG5mTnFuemaBoaFecWJeSmZxtl5y fu4mRnBAcEbuYHw60fwQIxMHp1QDY6SO4hzRg68vu358e7lpx10bSzHhh0uunVz8QXjRS2UB 3ozpi5fbFbWkOGbw35rMsHL26kv77/g4/j2osPuOln7JCuHYI1ti397LVrFnuuFsrP8vv0Jk upP3z9zv8mdV9r+/uPrg9J/JPks/xK/S/LWjqKZjh+L25I0rfXM2azdJFZ1ke/3yWYUSS3FG oqEWc1FxIgALzFwWuAEAAA== 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:(10009020)(6009001)(7916002)(39450400003)(39840400002)(39860400002)(39410400002)(39850400002)(2980300002)(438002)(189002)(199003)(54906002)(106466001)(92566002)(2950100002)(1076002)(97736004)(6862003)(6200100001)(38730400001)(110136003)(86362001)(68736007)(5003940100001)(8676002)(6666003)(77096006)(69596002)(5660300001)(4326007)(1691005)(48376002)(7049001)(2906002)(36756003)(50226002)(50986999)(8936002)(626004)(305945005)(76176999)(81156014)(2270400002)(53936002)(47776003)(33646002)(356003)(81166006)(189998001)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR02MB1419; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD023; 1:GnnLvE2yD1bOyWtdXWggFncXHtRUgK/U4FxfRm/iQw1le93LNrtuuhU7y+i4YVaxhlFc0FYopfPcQvXVXOt0/7Gf4Z2cD5PB7yCeoyuIXhl7TChByE83DQXNDwNwSYCOYzgNxnBGrXDm5zYNduW+tiBO1wt2YR7sLIKgEs8HaDT40I0bzo/LmLVSH8v1FhwTSBzi8pkmjbnIwkk2eBSuczoEOQTyE1zuYESMleMrIufa2BGMTtq74WZoQDgupLeRDaZpZSM4ubY8bvBKG8WwKd/DHic2Wz0nv6IN6CSSeE39ijpqkQF0DUqhFKachGYMQ5/OmeXmyf4L70JFRcxk6QFF2BP7h6+hlEdoE6Pc1tBTd1aT1skz52gGFDhWgP1wEU6wk3D+VGmAECx183ir2/TNYz/rGuk/bocSI5ZqV+JVBkZmx+N62yMZUpcbVCGroZJ8pJntfG45iumhDiL8fkkvXPVAXfLVAlEWTWGM/oBGZaPwywyA+v1I4k6eqNET X-MS-Office365-Filtering-Correlation-Id: 55897af4-e151-4d6b-e9f9-08d44b06ae4e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:DM2PR02MB1419; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1419; 3:Y6ZM4i5Gd0c+2RLmPhAchM9HVNQe8Bxdcs0fFDVQLv899VA/Y/JDsr69lNCCpKTafFtlVU6wczMHs+03LJ6mTzamQsQySb+x+eaXDk9wpDVjWDXUjxeDpSzH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 20:H6srfxuY7Ris5ZZDuaAEvr+Tdy8/o/YlEFN31yPw6vrLpgbRTyfoh2K+PfAqkp4T1OnmobkXAgOUDUiHXcdRwdZ4NHka1REmyKypRQ5KehEtHQrMtyaSlOZBjjYgAaZNrieocT4uBGrr2kDRnCUsgQo9YzszbxhxSQTP8RkOntKlmWVTQSm8jQ9SGWAmmfjPiXpw3hXpTE/QEfdSTfQh31hCz9sOgpJ00+F2ezQ9mW+/v8FOYMa1f9QUMpa21296n9tHf10ZzzR86sx519pVe8M4tBRNfbRsikPNokKWwq3Y4pc80drxhZiJrzdvZjAz6bfgBQItrxgu9TZYTLjSGl99TMWqLB55K6lgivrCUFz5GpdzWeJz8YFX0r3yux7gGF2A33YqzddkNrcRdTQh9buKhNOkPh092uWc54VbK9h1JxRxwqfH7pHItoAw2IK68P/IH0Wcca4PuooMDRTbsu7bXSrzLUzijddtpBgC87WqxQipVODxBe7avH6NN4Sl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123562025)(20161123555025)(6072148); SRVR:DM2PR02MB1419; BCL:0; PCL:0; RULEID:; SRVR:DM2PR02MB1419; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1419; 4:Uy41FjldTLij2mSsILZhzwU5H7uGJqoan3mMcsT47KcU78M6Lvwu322vm81d3+uNyYER5TLfRtkMcKZ2vHgOXiO3iit0Mg87fMj3TW3I/D6QpwsUkYbEf8Z4iSUwSLd/GSYjga6subue5rRVt7svAUfTAX6T0TDP5UGI4u0rzJEbu9+frQ2LLqsnqOWybjGNh8aU7ZYjgk8nYqNhEUX7wqj8L0Su0VIMOgJ8iGwipB8poTOtYHQc70ZFgSNIQL1Jom6QxD/+K0LECBBPcIDaACHuOQmbDEdIStZS7AqBahLWDQwlO8cJiA6dKZy/PtA39BszeohQTl0rSPmSdJEkPHOhGEFUKnOm2qYhxWA1F8GDMpgkbI4gjpSzyypyO034GOlraB2oNYR70ojOqgP/YYDSplKg6d2DtarcMDgYZS4b/1VhvrTxv61xlTk48iBl4BUOao65IlXycqTDqLO3o9RAhYXWFIV6t1kz80L93IbsulRt/imTNVBXh28yDmDCSCByrsMkgJimr1y6Sor91NEtiS3EGPtMVxo+N6gjiwKY8gHlumAUDe+nI7W6OgOXUkkBoAY0ZEeVHrujChLWqHzx+KYu0Ws3ISFTnfyQPNCcRliylWHrgft8B1w6G9bbgrKT7Ae+DXrVJ4NBFCQ1vEiuop+x6rZBEVj8WLwplsHDxnE/k2kBqz5urFPcv4Y/mtaR92CvOBuN1BUDXMJ8GQ== X-Forefront-PRVS: 02065A9E77 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR02MB1419; 23:AqIeX2Ag31IFyuikBrBzswhF2chPpJe0+vFN/fCA6?= =?us-ascii?Q?WukT63hWXo4l5r3PmQuQyN75GXE/j2+u5/ugKxHj9Od2rguF1SHLyTjxMa1m?= =?us-ascii?Q?Ws1ojHk0Re02zWXtk+ivNXxBTPxCzJJQULKYA47ayLO2tD1oyTYFz8cJpu7X?= =?us-ascii?Q?xvALsv+idCFA3fy5luZoGlCN4kOKwQkxcYrQ8lM6DOfgPIOaUdCOOaJW9Tvp?= =?us-ascii?Q?LZuDZtNmb7hcwXLNsJNBZaL4B0C50UxRS9Qez5isjRkuc7cp/rzbAtz90HCi?= =?us-ascii?Q?2DutR1W/l6u0hkTUZ86zH9pPUqdCQp0gdJgcIgkinKJejB/eGyJcyO0UxCzT?= =?us-ascii?Q?XSXYAZyLaccMw/mI+q5HG2Nb1IOlAYiw2lOCjm6+YAsmvTAuiYEUGvDvd4DN?= =?us-ascii?Q?MpdrteWzzGcJqNRqhHEk9FqbyNw0Phz35XT0k90M3pldmgfRJJUYERarsFEp?= =?us-ascii?Q?uOVUPqzUlb5rf6lbVVaxwDtxw8/UNAjS65kZgg0dgESPgX+t9cEsA2yPBiR+?= =?us-ascii?Q?HghAy+y9TwW38TeJaLVJk+AdI0gln0+Ojo3EMt0m7+pslWeVvNNRBPVLZABo?= =?us-ascii?Q?NSZax0WG5JDPiPMeAiuA7Pc29QSZMrKk8QVPD9GL83mmbDvYaAZbm8vV1FSt?= =?us-ascii?Q?mDwP0g/KvJvu8zV/uM/OXPACPgB1EynGLmuilkD3jFXKuPpvLhGuEeyY4atV?= =?us-ascii?Q?ZyrFNIkB6xJIvrNOFRW3e5KIL69hTiQuSduIb7WhPhxl+2rzjzMRcS0M9Fg4?= =?us-ascii?Q?A2HzoTaTiSw0c23Ueq/qFiaNeI7JNMcU/vFbn6YoFoqGQxDGLeaYXw5NiMpl?= =?us-ascii?Q?BwFiUhPdz9rorrIaWq9in4i02MOfBxayEwfpPNm9vqsdQAUGC+fvobVoobcR?= =?us-ascii?Q?wga634As1nRS6T1yBeepd64uULgqNPW1eaN23lQdtVPUukmPBkJYcwmClm58?= =?us-ascii?Q?u10a20ugVJeip0DKcig/ZMOxMMv32SVmOyT7YC2NfTF44/h7w6tKJL7jeD6G?= =?us-ascii?Q?ZsjdNGM6DLula3UfTcxXpHLvinCzfkUUQ4g7TK/nak+en0esylYgwsGlGQUV?= =?us-ascii?Q?xiHdmHjHenLS/Ye3dGDqSk/AkkBUfVOFYG2DhB0EV9TtfdGj5gpPIGSXhUZY?= =?us-ascii?Q?7gN1W7PAkg+bZ89QOsrd3os0YR1VAfB9GEwyYHoebjUAwqlt3HBH+4ygxNr7?= =?us-ascii?Q?JVof8OTLVxQHF4e9FLuatMJjUdQUFX4ydzSGg0mbvYqeN8HBuBays1fYA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1419; 6:VP1UNqPcL0UHF+ryUCMZlGYR726T2JV6/3cdQYz4UKXXGjGHhIYLA8dDWIDh7GsvDaj57o1tozRLcInR8JJ9z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eje7ciDbeXWBWzAA6JX3F7QIUpWKpRfXHWG1oUn+d3nalZ7iZDML432JpvnOwRr6ztJnSq+9HYc2egsS2mizp582FCIVMQb9cC5HOgMkX1nmg0pFutPB/y+WZQl7EgbK6yb1tAwuld7u5UGmmvlMO953g== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2017 00:59:02.7852 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR02MB1419 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 Avoid that transport_cmd_check_stop_to_fabric() leaks a command reference if CMD_T_STOP has been set. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp --- drivers/target/target_core_transport.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index d241c4d27352..25bc214a4eee 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -628,13 +628,11 @@ static int transport_cmd_check_stop(struct se_cmd *cmd, bool remove_from_lists, pr_debug("%s:%d CMD_T_STOP for ITT: 0x%08llx\n", __func__, __LINE__, cmd->tag); - spin_unlock_irqrestore(&cmd->t_state_lock, flags); - complete_all(&cmd->t_transport_stop_comp); - return 1; + } else { + cmd->transport_state &= ~CMD_T_ACTIVE; } - cmd->transport_state &= ~CMD_T_ACTIVE; if (remove_from_lists) { /* * Some fabric modules like tcm_loop can release