From patchwork Thu Feb 2 00:58:33 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: 9550913 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 0D82460236 for ; Thu, 2 Feb 2017 00:59:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED0962844A for ; Thu, 2 Feb 2017 00:59:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1D9E2845B; Thu, 2 Feb 2017 00:59:24 +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 64BC12844A for ; Thu, 2 Feb 2017 00:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbdBBA7X (ORCPT ); Wed, 1 Feb 2017 19:59:23 -0500 Received: from mail-sn1nam02on0056.outbound.protection.outlook.com ([104.47.36.56]:24670 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751311AbdBBA7H (ORCPT ); Wed, 1 Feb 2017 19:59:07 -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=Og/3c0zCeUvLNvfTEaM2oS94NVxrpiQKodBXw9J0TJs=; b=Y2X4utXaYkjJLf8Y5f/lkKzsdKFrB4KrHB6H5iLNw0EMxMnavfh22M89Y2bsXGRvhwTvySy8l5b5LgpiyaNuVzEc1a2+2F8beEXQ2HkYesaMHkcpKijyNdINVOjhY8mZnBSm0cecYepg0R5tNPTzqPp6myfRsasvmjr/BvButbo= Received: from BY1PR0201CA0031.namprd02.prod.outlook.com (10.160.191.169) by CO1PR02MB048.namprd02.prod.outlook.com (10.242.163.25) 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 BN1BFFO11OLC004.protection.gbl (2a01:111:f400:7c10::1:190) by BY1PR0201CA0031.outlook.office365.com (2a01:111:e400:4814::41) 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; Thu, 2 Feb 2017 00:59:03 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) 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.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 BN1BFFO11OLC004.mail.protection.outlook.com (10.58.145.15) 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 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 CA.BC.01420.E0282985; Wed, 1 Feb 2017 16:49:18 -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, 1 Feb 2017 16:58:57 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-a0-5892820e128c Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 1F.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 16/36] target: Stop execution if CMD_T_STOP has been set Date: Wed, 1 Feb 2017 16:58:33 -0800 Message-ID: <20170202005853.23456-17-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+NgFrrKLMWRmVeSWpSXmKPExsXCddJ5kS5f06QIg68rNC32z3rGZPH1/3QW i5WrjzJZtC59y+TA4rH7ZgObx/t9V9k8Np+u9vi8SS6AJYrLJiU1J7MstUjfLoErY0rzKvaC jRwVp3+0Mzcw9rN3MXJwSAiYSKzbV9XFyMUhJLCUSWLdlbVsXYycQM5WRomONcEgNkhN19Gn TBBFmxklNjzdyAySYBMwkvj2fiYLiC0iYCDxu/cCI0gRs0AHo8T8nmesIAlhAW+JyXcmgjWw CKhITL9/BizOK+AgsfZ9BzPEBnmJXW0XweKcQPHFxyGGCgnYS3z7c5QFZKiEQBurxJRLK5gg mgUlTs58AlbELCAhcfDFC2aIBnWJk0vmM01gFJqFpGwWkrIFjEyrGMVyM3OKc9NTCwxN9IoT 81Iyi7P1kvNzNzFCArtwB+Pr296HGAU4GJV4eAVEJkUIsSaWFVfmHmKU4GBWEuH1bQQK8aYk VlalFuXHF5XmpBYfYpTmYFES52193R8hJJCeWJKanZpakFoEk2Xi4JRqYEzKLujsEJt77GX6 ihuTSrVWT8y/HVrSy2U1ubFBovZ569dXLzdqWkWFtiQ/9b6kPdHHosb5Z76z5lOmpV/qehY/ 3bPmkOPGa7w3H9/4c/G24azrP5KtA5Wcsn75njpV6fff6qR7lvjBrnO7pmUfvL98lc87jsD8 6HMs8nYLZDVe/lRQjWhRcVBiKc5INNRiLipOBADUxrsvaAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGJMWRmVeSWpSXmKPExsXCtZEjRTewZVKEwZwV/Bb7Zz1jsjj4s43R 4uv/6SwWK1cfZbJoXfqWyYHVY/fNBjaP9/uusnlMW3OeyWPz6WqPz5vkAlijuGxSUnMyy1KL 9O0SuDKmNK9iL9jIUXH6RztzA2M/excjJ4eEgIlE19GnTF2MXBxCAhsZJe5sbmACSbAJGEl8 ez+TBcQWETCQ+N17gRGkiFmgi1Fi05lTYN3CAt4Sk+9MZAaxWQRUJZ7cegPWzCvgILH/9BdW iA3yErvaLoLZnEDxxcchhgoJ2Et8+3OUZQIj9wJGhlWMYrmZOcW56ZkFhoZ6xYl5KZnF2XrJ +bmbGMEhwRm5g/HpRPNDjEwcnFINjEstM2eylvmGpdZfPPFn8/57m5qbFh/7p3uH64yrv4bl jAMPLzLKndvpcuFqjZf2+ts9z/NqVFM2rlkzqYw/Nak8vEGlQX5TxYwPXw5Okghd6azw6gwv w5Uj0wwOa57YeOqZ/1MHjXSV7ZLr34jpPyyS/pVV3He9U0Qxnue3pnXD47Wupk8KjiqxFGck GmoxFxUnAgDHoHPiuQEAAA== 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)(39860400002)(39840400002)(39850400002)(39450400003)(39410400002)(2980300002)(438002)(199003)(189002)(36756003)(110136003)(6200100001)(1691005)(53936002)(33646002)(48376002)(189998001)(2906002)(54906002)(38730400001)(2270400002)(6862003)(50466002)(5003940100001)(1076002)(77096006)(305945005)(2950100002)(356003)(626004)(5660300001)(6666003)(50226002)(4326007)(8936002)(81156014)(47776003)(69596002)(97736004)(8676002)(106466001)(81166006)(7049001)(86362001)(68736007)(76176999)(92566002)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB048; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC004; 1:J1OjpZF4UVAPTTJCOvduxDOEOW4kmPhJdro0zhbdePyPkypR6R+iYvOvgu5ne3sJ9Nyl1lDIP14jCAuLVbQ7AaVLwN+vTCQERB4qYbem3iUjV5IqGCpaCLKmOu4Lu5Ocdynbnm7pNU4lYNee1cfpjnS/VmSKz6haa4iZM8qGCKdlPjzGhs9SdYM2sSmvG7xcwhSXkhGEQmoQT46RqbOyN5e7Jfc/rPvSsO2xpCYICIOZgj0UVnQ2HJ2XYiicFotkbTqoPekSZpNYcfhBg0Qlmo56CMQfAHEWtOB0Q91GXvG3JfBUwXfTHRyL7vIR46GLhRY3Lal1xDN0xozDLF7uq5SR/zS3Ntd4VHf1wjahGgtXDgRxR+UBO6JKxA4inazszmZSJFrEYnDrJcAUeQcZQvMJFzpGQMf0AyxsHzPdgBnUZL8d9YcMsB9D/HLkvXNxfYc8+lxO40TM4XdIBEs+Xw43+LD99xznXbHMnYa0yHrdjQh8+6nyHBNIZJwAwrz0 X-MS-Office365-Filtering-Correlation-Id: 98251d3f-3e96-4937-3b25-08d44b06ae4e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 3:PKQ0ZqyojCYS5KYSwIKoGZy5FcKvf43rlC/5SoeHBvVVc84aFaTxBx5h1lxSjQHZVTWUi/U/VjV4b9kE85bD5VobO7RIISXoyJMZfR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+4kKshugKVNacGNP/scJ4Q5 X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 31:1oRAWOKBg/g1Dqohf1yuQRLg4r/es2ODRh6AHjr5bbY4iW316MK6tb7e7NO8hsCBr0wcMWJLlqMcRlSVRjA2786KZt+QvFjD2AQ8awJH89CazuICEOP8/yi9oU3ELrQa5YHIUr42dj+LY/xuHkDoq+WpA4HjR0Hqf0vhuiPoFXhhsMt0wvc50qJvzrKT0i5IZuiqweyBBZaswZoDxu4VGOIin/SV7rNSKoxFivsgugQiFy8KK6UZFCTVqjMtGXwDgc4sNcSjYPRLUFrODK4k+A==; 20:YFK0OYlbf3JVtVuz+M3xD/hZqlwxFImQLrOulwRy2PTUqyzcLzg3xFunEFa472LkPaSYW0/cwHR18DpfTmyjO5uFWtt6XfqEEgV1B9cKRjbbWKQ7uLUu+gx42bi+YpmRGSKGXmLA5fFjlzReo8E0dwEdHya5EsAxZEVP4cuVTKUiryrw1g3KV6NZ5L+IJgjYrtSSl4vhZ5gaZOyXUXzliqg0xWIkK/Ygm7h6Al9LcoV5biDw/33boXrF8BDFOYc+pHqaM0+20EOx4NNnMWso+gcJGtONk17/Hdots5cYYfArOSX876vsVYBWfsVkkNlgf5XUoFUTqBRPL7gBVuMIFTsdxybuCC73fnisQYtbhGUvB38HdeJZTltHMYsuokPhF6OaWiWiqBqBTr0KCc5fXKBuGtHA+ZXSB6WcBaLlGkREw7h/KMj4feSDc37J5aDPvzCxdEj5s5xA0vpBEXzOmNiJG+kbP7IYcXFChM4cdlWCpAxBuLhH5DIm8RXHBqo2 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)(13016025)(13018025)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(6072148); SRVR:CO1PR02MB048; BCL:0; PCL:0; RULEID:; SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 4:mVIwvNhSWtdFKGDcPd3rzPt2hkZRdB8uzIUkFTv0jNopIR9no9DaUkWBzNC3jv2VkY1ubbqTKpNsjZuWDVM0VhCL2IN0M/5d2FSBj90hncfrO1dof2FDdCsRvkw/besH41E2a4QS+5ZfQcBNE+jR9UZDxQ5thSzD7WPMLSH8O5eTz/KceZMWcpNLP6hocRBpkEBKkGeFpiR4zCfghSEqCrMYT8Zk+bOBYa5RyFytkbsDySBuPZV7WsOHkcZV/iVKfLm1bA+UyKtnjqjNeOUkb/n3SbSU8YJgREbft8lFatsWrFh3CUxc5+btSblwWHTyKuTJ316Kw8OkpLHnuUjsIqYQKx+k74zUn6A2GWBncUAoefkxcUHOQjY5z/6DwtNNjQ4A1xiEaiNu5GpoNQ2GLaLfcZUmZcBPxtcYybOPEk2GP+nYZchYgoPsO0X5+BDCYrlXeAeCScNEiTUScWGIfFfiGO6lst9F79ueuJJK78Pq5yBHbpI4SjQ7gSrnuSi/7WcgqxOLYg0/DqGRhcwjWWXgISFDkzkpLq7yVS70yJT+nO5wTkGtlOSnU1Kj8kS99dLBoCxsSHAb+qI3esm9OLmI2Ze4GR8s7yqCSuf782616HjH05xlBYK9AJgMhbS2/TzCvoxO8Arhcn6HR3k8wLn/xqRXfT9maKrAYGATdswhLjR05Wn5LCb8kuRh8ulQ7kh0Br6BH99WIYD+OABgBA== X-Forefront-PRVS: 02065A9E77 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR02MB048; 23:0V5NWYW6AbMLFSeOOwUlMtqPoHmawVROmLr/efGg98?= =?us-ascii?Q?sUGQIVEbGEx0orFmgM0wxw4Gv81vKBoKbRVf2/LG25TpEzYe1BNCwHByaH3G?= =?us-ascii?Q?LWz8nh+eyhSimM0PvfeL/okFYzcLfJKmLA9Mu6uDPQmWSgyaH2rvbFvXLjLo?= =?us-ascii?Q?Zs/o0YkqNOUbfJd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cmW4euaquU?= =?us-ascii?Q?Gb8ME5Jg0um+HxiVfMgXMSo5U3taiH3ygZS9HKoTCfQU3R2mX1yC/NZo0fei?= =?us-ascii?Q?3CH8xHZvuL7pAJ0d47IqK5WkrksFe+fyBwRRWX0q6AFzzLoUzcuu03XpiWwA?= =?us-ascii?Q?HwuK3PG1/qpV97CQaKTb4AbflWYFh67fLIN2sx0spEGmi7algzMvlgaA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 6:fzX1a2XP+3YIZo97qGZLJb5JApBTSHd46vK4f/Eu3yL3zJr0g3uROq7wYwjsc6M2mG4/I9/m9VwqyysFucDMv/hsVZqAJ2PCb34v2i59Fn/Fjx98DI27kSe0rs05xQxfWoGrgJAqybR/k+IV2Txr5D2P8mjbGjRJX0HUf/f2t9912TuvIhJHdl7p47BW8DWQ8EnhKI3Bcx7Gcu+4bEzzn2YJ1yQPWVnRxFo8PvvMzkKf04PgglLvmyS+Dixao5cJVuuOFM6YQ3edXfY4b1bVi+5Ii+f+PxL+RlTIrDoNJ0YVo0cwV41EYtpqtLNLEI8UFBzliKQhXi49V3txhrSzn/K4Ppd/HlZsylx13tjqLRTkQGpgPeEL5t+O7HXldWsPp7REA2AaCV1piZA1jrIzZUX1/lSn+6UH09R9VwEBV0mooLnfcaqu3O1/okA2Kh2w; 5:WUQ9NGM4VZobgG2PfnOMnuTSct+bMDc6nt7w2wOaF/jvA5kHmJZ7dasqqoY82wZnE2dzloGF2vL6YnpbhqiFYW1IdX0F5XvrVlj/kzCvh64EkCQsMO6dT0HZz5ahQC+s0Zz1BWqU1TBqEejaA3CSV/zw1nGZuci+OPrgUt72m+w=; 24:bH32Jyeg/MmdiSEbO641wAtlGN6wMjGrwX18JDzT0Aqy58Nyge5d1NC8VXPnbocdyS/dkmDKY12miQsm/XzFBANAkjJfEsYZazTUIfSxNjw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 7:qy1KbExBmcBNeiqy6993NEGkvYygszfWb+vd7ZfodKcDHkuEBP8TtHkukYmtXRezYNY6P3rMV7Yh92bORmLVHp2KErFcm1E87H38Dv7PxFHTV1av26Gs8J7rP7MuUF/+kO1ZQqSpQGQ9VrcOTfbSY56IMyUMVnuwOIX/nD631YV9CVAqXBVOksHUlDKYR6dQybaphKG/DP/1aPzcVgypcsVBDvwGQKh+CbnF1D7yp7xTb8jnSef2DZjjAb0Bvrq/y/JmnPzYJHj8VQMIeRmKKPlERLvnPVsPZQvF5ZRc56nFvQpk/VS5fADYWuto9c9mEOziCq0gwIg0i2VwRxuZFF+M2K9b8SL5AcBV0iBvqLf8PU8OjXWisWKqHxoyQpaSMuHQI9EhvJqvQlHsr3TB3tA5ZTKgWVC69ihpf/GQsBXL+jNlaTycsb75rW4GkEm3TENQoQ4OiezUIzhCHzf0bXlEWseB1JiPIHJfeR60kXYloE/7KH96ZTMeFH9K6r1Z+bX0WhxjGsyfSjiMuv8fWtU6EeP8J7Cywa7NY5Jn3yVBJ4SaJpx/ECnRVoQXVsXT X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2017 00:59:02.7808 (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: CO1PR02MB048 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 Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp --- 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 782b511c4f5f..d241c4d27352 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2456,7 +2456,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)