From patchwork Wed Jan 25 23:36:26 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: 9538159 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 7C5E96042C for ; Wed, 25 Jan 2017 23:37:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72E4D27FB0 for ; Wed, 25 Jan 2017 23:37:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67D7B27FBB; Wed, 25 Jan 2017 23:37:32 +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 DC83F27F17 for ; Wed, 25 Jan 2017 23:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbdAYXha (ORCPT ); Wed, 25 Jan 2017 18:37:30 -0500 Received: from mail-bn3nam01on0059.outbound.protection.outlook.com ([104.47.33.59]:21569 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751332AbdAYXhX (ORCPT ); Wed, 25 Jan 2017 18:37:23 -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=4kmmlFLLTxWugkChZ49MTvW22TZeKMNOpEOkOd4xqM0=; b=s5Q95jJydGvYychq4AnRlTzNGMWo2c3xvu8EFPPAw7Iv96spqNBAQwWpR2ihN2f0xXIrUxYUcZJsYW4XHQ9H6ZRiZMRN8h8QPt4kbgggY0Eg6hkJqyR4hGtIu2B/MUGFPlKYuhf3UU4EiHcMlD7E0tsWgkypRj0w3sLvi0AvQIU= Received: from CY4PR02CA0048.namprd02.prod.outlook.com (10.175.57.162) by CY1PR02MB1285.namprd02.prod.outlook.com (10.161.170.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Wed, 25 Jan 2017 23:36:56 +0000 Received: from BN1AFFO11OLC003.protection.gbl (2a01:111:f400:7c10::150) by CY4PR02CA0048.outlook.office365.com (2603:10b6:903:117::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12 via Frontend Transport; Wed, 25 Jan 2017 23:36:55 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.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 BN1AFFO11OLC003.mail.protection.outlook.com (10.58.53.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Wed, 25 Jan 2017 23:36:55 +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 D9.A1.01420.D5439885; Wed, 25 Jan 2017 15:27:25 -0800 (PST) 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; Wed, 25 Jan 2017 15:36:50 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-84-5889345d4e39 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 1B.35.16817.19639885; Wed, 25 Jan 2017 15:36:49 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Christoph Hellwig , "Andy Grover" , David Disseldorp Subject: [PATCH 14/34] target: Stop execution if CMD_T_STOP has been set Date: Wed, 25 Jan 2017 15:36:26 -0800 Message-ID: <20170125233646.2243-15-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170125233646.2243-1-bart.vanassche@sandisk.com> References: <20170125233646.2243-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsXCddJ5kW6sSWeEwdcV2hb7Zz1jsvj6fzqL xcrVR5ksWpe+ZXJg8dh9s4HN4/2+q2wem09Xe3zeJBfAEsVlk5Kak1mWWqRvl8CV8eDtM6aC Zo6K19vXsjQwPmPrYuTkkBAwkbj6+CxLFyMXh5DAUiaJD5v+QjnbGCVu7JrDDFPVsO0kE0Ri I6PEn/3HWUASbAJGEt/ezwSzRQQMJH73XmAEKWIW6GCUmN/zjBUkISzgIXHhwRd2EJtFQFXi R/sZJhCbV8BeovnLC1aIDfISu9ougtmcQPHWsz/BhgoJ2EmsP9AKtllCoIlVonvLB6hmQYmT M5+AFTELSEgcfPGCGaJBXeLkkvlMExiFZiEpm4WkbAEj0ypGsdzMnOLc9NQCQxO94sS8lMzi bL3k/NxNjJDgLtzB+Pq29yFGAQ5GJR5egS0dEUKsiWXFlbmHGCU4mJVEeNfJdUYI8aYkVlal FuXHF5XmpBYfYpTmYFES570Y/TFMSCA9sSQ1OzW1ILUIJsvEwSnVwBhZq5Q8IX7Hzy/7WF+b /fIp5+w5+6T/T/+vfPUK22MsixdYxHAX3ws8vd6JUVz0x5LqUq6Lk/+tWSLO9MjzioLOyv4l dh6PvNn3s+R1ObBuPTeB55R07ly5sJ/d0aElMx9nC3UtkassbyravbBlUVSFqCN3xPvXgZKe veUPeP5HLr79Ie6/lBJLcUaioRZzUXEiAMrgwblqAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGJMWRmVeSWpSXmKPExsXCtZGTTXeiWWeEQd9qA4v9s54xWRz82cZo 8fX/dBaLlauPMlm0Ln3L5MDqsftmA5vH+31X2TymrTnP5LH5dLXH501yAaxRXDYpqTmZZalF +nYJXBkP3j5jKmjmqHi9fS1LA+Mzti5GTg4JAROJhm0nmboYuTiEBNYzStzevAIswSZgJPHt /UwWEFtEwEDid+8FRpAiZoEuRolNZ06xgySEBTwkLjz4AmazCKhK/Gg/wwRi8wrYSzRcnMQM sUFeYlfbRVYQmxMo3nr2J9hQIQE7ifUHWpkmMHIvYGRYxSiWm5lTnJueWWBoqFecmJeSWZyt l5yfu4kREhKROxifTjQ/xMjEwSnVwBip51AaMXG7qfFOw81+rnt3pQaqh2b3580S33hv6syP H+PlFrhy2end+Zx6ZhWX2tq3ades3rNPVhRX+rTnxfIptRz5RziMi6fEKPhvuqTVcjZ37bP0 Ch6pz2dUv4qYl21I/Ood11ZlHFN7POiNMMcykZPfBQLNOu0iuASi1PeX/dp0f76zpxJLcUai oRZzUXEiAN0C35u5AQAA MIME-Version: 1.0 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:(10009020)(6009001)(7916002)(39410400002)(39860400002)(39840400002)(39850400002)(39450400003)(2980300002)(438002)(189002)(199003)(97736004)(50226002)(77096006)(626004)(2906002)(6200100001)(4326007)(8936002)(1691005)(47776003)(189998001)(92566002)(305945005)(36756003)(106466001)(54906002)(33646002)(38730400001)(356003)(7049001)(48376002)(50986999)(5003940100001)(8676002)(50466002)(86362001)(1076002)(69596002)(81156014)(5660300001)(6862003)(68736007)(2270400002)(81166006)(110136003)(2950100002)(53936002)(6666003)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR02MB1285; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC003; 1:JxD2aDC4WQ3OxZxe0yScCeVBgcSLL/IQZUiwpj9vmrDYeiKL7KFr3kD2taA7Ca5Y+NcQV5q6v/CLDaL6fpnHJvb6+xqCNBz7eSYr8k794dwJhqJPzn3Jq3VPbjlYx0mW6RRBlZLU3YFjvmS3d7jvRMQ0duvE0+IpKK3ItATO168bfO5io2TrLlFBlX/5XCpn72JD7nQO/HQxkrffU3AkMW4kkx0uaRMe7R2wJPxuX0NY3KnybkEj9dwSpTMzMQUcLRxq+ofnqrHnZSuN75lqF8JhDyb4JruUCrfgJPMIUyfjazoio+u0YpSZRctSlmwtZgKsEJm5cKetZpSZjD64CwZzyD5BXgK5SzjS+RmO6lMJEY6UBa6LIoVjzTFJEWO/30BW4f7WJ1BDJ0TF6YZNnzv9ezGaPOiOCjmx5KwNYt9iq9erGq66mVUjXeCPalXHwEl1h+gXwpt90ZCV0xb3JA2cwHn19jsErZT5TYyYW/ZMhF1xwho+OIYsfrORpUUq X-MS-Office365-Filtering-Correlation-Id: a4ce7938-2ac9-435f-8fbd-08d4457b0ca1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CY1PR02MB1285; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1285; 3:SCZLv96Bte7mJ5vvB0hwUEjPKSCtIciiwfVsUHRaG8aCTV4tnjcEvDAhdTH1SG60L8DQKFCk0EgbnghSJVYcXHnu44SXP4n4RsG6xp/lc64sZMZhFbJwx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Po1a35Ydi1jA3y6GNR4JP X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1285; 31:3DBpWOeKpMF7FiyOsQTgofyvPYrNJs2UA9tRaDrbB1ob9IXlj55SAoZlbzVoVfTBgd8WiuntTR+JuhWkglGmmCJv82WFfCudHjzQKANeVlvh862DUr018IVnh3C4lBWWQmjhDF8Pgf1OPSps9qIcXAuAKWgIRkhPFjETVprizHLGDFtWp3CYTLRnA/mAYGEFz4og/zVpq9X74Q45Kxcj4W3Cr+VK6xG+XEJuxLW79mVJTpUqXI17vz5g/HfdD9WfaOJ0/Wwz8fFnnrhLiRw5/Pm4lK/F32cvp7DixI3QCVM=; 20:RsTJKCNZqsqxeA3jT3GRZitXIYTOGIjpYSEL9ZO5cygcdEu+gmFLYSAzC6F9lKomRx0GFw6OHEqlGhKcWwQlLqBZkNZ7+gvFrdrV6+P5MxD1Q/ExaIV8Tpwg0nvG2mdiI5b5j+zdBAo9vu88bGucmSUlsHhTfJqFN1zk4NQAIzvRfU2oEaTX0NaFA19zXaLn3wpa2jiGWbEbwtWb8NnWJOPiCNwEZnUoSudGM5ry1oDJYvJI86RhGX5L0fCY4/YGJW+sNc6xWk9/w3rTRNUO4d9E2u0AN8sW+UX79M/X8GMORKXmlZaf8bqCOtN1pNSmKmrXd2BFurcmOXZeid2kyCWu03TXlC6opar+1yyR+ROHsgePXPjJFphusDxK4ME95mBHTXEjw8tCiFw0hS7zQJq7bqUQ8tS2jcveM3nCORGhqYj7RH43OfQLrasgrZLsonV/jAkcCqpeapkDPpUfY3ZWBhpJkagWdZ+7f87c/Al+P6HXUokaUW5GO7Po+nJI 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)(13018025)(13016025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123558021)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR02MB1285; BCL:0; PCL:0; RULEID:; SRVR:CY1PR02MB1285; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1285; 4:plWiN3BcYS+yXRbK9WELJBpNtSpzL1VvLhVFQ8tmsvo3SPKy4ZNL9ngG12aANa0MF9QR4IRvxyEiU5+T2sJwMR+kvvhHN3+S2+AfgssA7qK7uKoFUr6MWHCR47Ylyahodb17HUyBV5zWB6rId6Cb6ygMTEudYXpuZpNlCdoAX/BZtRVEzgTt8EobSNJt7KyVjAcFkap73yH1XhBEo2NrdRWVOAERDWA1IKZ3cq1v5bpldx52KOgf2+sv8I45bJrTT0CIrntFvk7ZlLVIMxt3G2F//nSEWylkvF+d+wNMs7CPHvwgdPmMj2pLw7SHjKWL4rgB0CGl0J+RmBf9Nv+48uC3wRvZn86yPTKN+LcpK1fDohRFNX7sVidZeBenk8xP0arFLIUo0dW1Ztfn5Ow39DVq7np8jVSQv98xEHUKLYhVe+ZF35OMxvmhf00x5Z8wOsx920DkVr3BJ0qfBHD8Rg3+rhCAVw2kVO4u/f3UltuXWFjmIBit23mmHSjBt6XOZVry135X2w44kdoxZPSeTiuc6yvzpuV8ZftgeD1wre2MxEwFXjX0z0SQ+6cVxa507yg+I0beBMNUbtfkJeqcpN+hkgcYBUvv1oE6gvFiHJp4a2aqSaCwSnyMXFJHNVCCxFF/7uVp7K7/K4UaftNw7G8cRIpjgd/3Vl/xNozz+FHat2KXD6d3gvAzjd7eRlaUAl0G5eBUSa3GAIvXVZ65qQ== X-Forefront-PRVS: 01986AE76B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR02MB1285; 23:WEiUB8mAbWD6Vp+CzS99niN0UZNF/xZhGsL8HtkdW?= =?us-ascii?Q?vPkcQQrrIAWupx/lMtudk0ZobmkoS28ZyyRInBSURcnCNpGNgJP8nXYTOIOx?= =?us-ascii?Q?vwvyBdo1QeH8L3mTX8H5GiB4S1G97xJAEaf1Rys7ldNLXAGRWFnc7vH+Oav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: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1285; 7:7ZS1JM/zSTG+dLovAZ98JAJjDtR/T+aMyqv8Zb0ggTRyEncNvWVS1z/V2mGVXVE1MLVGYKAgdxebeeOxI74qdK0qd4gp3v8D/JieJ1XaD78q0yJcwqiA5HRIz3/zk7cgzplikHz7LCGjQRF+BaGBBvTQmv+YF0XNl0iIVkm8Rhhb6Liqx0YAKg4htiwCovLAU+T3VZzSQ0/mAJBqnXj337lKtHsTObdP8vwH9Ns2heKPmBNHjCBSJg+pyKnuMHntIpdz8RUYnbju1p0hW1W3EVkANSs0htAhIMQiIFrUKvF7HUF8xqAJlPk5I/YywVfmNdUkFKn0DJFDXZUhCpej1lyDMr5yAbikSczWtiCS01tlWkkGefVB0TY0zeJKQpwITIkbgdypVS20922xccfbL0ydrtWYjkbpILcGUKBeEcUa9n+Vc/1hOTurIpbQukqHkDCBLJX4wPMapFcyhWnyeg== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2017 23:36:55.6611 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR02MB1285 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 Stop execution in the unlikely scenario that CMD_T_STOP has been set for a command just after the command has been added to the device command list and before .write_pending() is called. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Reviewed-by: Hannes Reinecke --- drivers/target/target_core_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 55e1d3898bdd..f7b31cade25e 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2442,7 +2442,8 @@ transport_generic_new_cmd(struct se_cmd *cmd) target_execute_cmd(cmd); return 0; } - transport_cmd_check_stop(cmd, false, true); + if (transport_cmd_check_stop(cmd, false, true)) + return 0; ret = cmd->se_tfo->write_pending(cmd); if (ret == -EAGAIN || ret == -ENOMEM)