Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbcLAPDi (ORCPT ); Thu, 1 Dec 2016 10:03:38 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51056 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758611AbcLAPDg (ORCPT ); Thu, 1 Dec 2016 10:03:36 -0500 Subject: Re: [PATCH 1/1] block: mtip32xx: set error code on failure To: Pan Bian , Asai Thambi SP , Selvan Mani , Rajesh Kumar Sambandam , Vignesh Gunasekaran , Baoyou Xie , Keith Busch , "Mike Christie" , Al Viro References: <1480558246-19015-1-git-send-email-bianpan2016@163.com> CC: From: Jens Axboe Message-ID: Date: Thu, 1 Dec 2016 08:01:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1480558246-19015-1-git-send-email-bianpan2016@163.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [216.160.245.98] X-ClientProxiedBy: BN6PR02CA0043.namprd02.prod.outlook.com (10.173.146.157) To CY4PR15MB1192.namprd15.prod.outlook.com (10.172.177.14) X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1192;2:kDWcQe1fnlZ9Rxlq030JkEGI/cI/yFrmdBkurxQVh063UZiNKISYEFW7TQilXZx5zVHK5N00TWMW7Kxg0F+hp1hPVU5FzYiKiwD8ZkWZKw5q1n8TT2Fg/aQjEekoHvQStJ3PpmdG/qhsGX/GW4kWPhmVeXvuxHXq90SFrSXdImU=;3:Xvm2yjVAMhs8sHGfoKoveaTSBfEvZha0+oFwE3cwkKpMxBrUNPJR4Sna7nlgGkA2eVmqpCsSDVwNwsEVorXJvpTOQoRjvgOAiNbdahULHitDYruyaja7LyGtdau4rmwF/N00dSFclMMC3mIj1PmPknrdXSbhquB47M8RBI6kej0= X-MS-Office365-Filtering-Correlation-Id: 2cd2af13-1032-44b0-384e-08d419fb02b5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR15MB1192; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1192;25:+LBAu+YaTrZ0As8rIfh9c9VK/cm+rwgqU3ibRSJT1Obk8BAF4hp6tskHPDlWaXfkPda3KfqYv30jurRIbWvTKydAq2Qu0ZiRK5NaJqTlW+TCqJ9YRH9ycRwVgzHVsEPlyRq27S4iO668vKKeWpjy++rQ5qW4ZdOI660N/07fYhqJ+p76CP/tBX4PkhZ+Z+hdRlgm7SySqywD9iybmYp+64zVXuzULbGeJhq+MQArZQau1WRptkwzAn+ejl7kb+iSsy1BpwFiCxEqbOya7QmZCAUkO0fpNd1AIgWy6ptnCVakrcnHnCBwQdM9EPn0GF5//g0cwF+YX8gy3aXmvB/mHdh/kbI0LVIPt9S4oIBs8gYnojRT4sksn6A1E3p29aYtogym4QAAorM/rrWxkNRjt4YOU6xGQx3Zxo9on6I8HPXpWEmbLOKjjoheaEsqPmQwoIfo4xzO6RZRLwV4kVLGpbEpFDPNNAT8Oaqyf6UGgXXbHzmYKtdo/ZcTZjFBQfJEAaWUi0NK91fCgkAsdqZLhF482mhetPPzdY60cSQf4qFNJo/ux1+KjS+Hg6jh1bvktI0ff+OaFq//Ckyjg+C5zG2Z/Tcj6H1bAyuMkEUr45kM80hIkvQr5CBKOYw+UXvRSk/+sfk4FIGCAGOftxuH2VhAvg86W6F4qqU3tBHVirrzZGhT3xMBDTWlPjb9hY6l5O5+AIsxdPXr1IGXO8jYhYFacgS98ntOIULqrEAWHmgvL0nGfnMhYJ9f/tSdYRMJmM8FYUbKD0hx3qQiIzUJD90N9EZpLWhukIzMvRtoQqS+q4CJKtuvHZD7eXBLuDYKQI8UVP9Hs54NW9/SQUj1/tA5TDEC91FTqM7krKOajWaE2B3xcQEqx9OBdNBUuxzl X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1192;31:LMLykiMLhvJqqAXNpV/ZakUfh+6geeD9e6Q05k2hZJNMe0cxMxZ57iOw76zJYYR0KqRX7stKLkzzApMWgqgoAgFtpa1QCUOVIVZ563qeVvF+92XjCuDZMEUeHcjg0czCikgbF5ESgRMX0YbYn/8XkR4D7Tvq2tVhKCBSQq8nKY1S52I6zfYWEBxsQxp56T6afA/0fCUSH4Crjj0r6wQ+bG5dxelu4Pc3ZYG11LDaT3D4N6U2/lhj9ew5p2MZIN5sv6Hj8nFX+fiEkJ78qHhMFg==;20:qUyFnQd1OanxbITEi9bWgJ/K9PESPcBbewYJj5Z/FfddzR1FYWjDQpU8+LlP4AzUfEYF9anr+sFI+rB8qHPcQpTK80kr2OryAL4nquNkgf4xy6ItedZe+6aWBu43kmcUHlkHp4AIlIf6uIx/mrmGZIV6tpmhjwk6K+4kDNKFjTeTkk50Yf4RR9ZYWtTPHlMNnUn8UdVvTZ4z1c0nT1ihVm9nHNcj26C9AgEzzLwxBYU+vv4vXqwA5MhJ7T0kC9Hd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148);SRVR:CY4PR15MB1192;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1192; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1192;4:r0vl4c3bX+xPUFDIk7NFVmFSmgLOpDvr+6udF3VMbHsni3hPrpRPo/MAt4xErAqHhhRWk37y5QVLgZJii7fxMvNs7MPMNDvGj31ZP9o8F9Xb4P3k2ZuBCOsyTBbPdy0VWL+9aO/jSe1Jx4k0jS9sxui8xI5MHgwIdoeY4g2ahvSMxpnC9Ja9ZfpEXAHWR17xxLC3RFRcxuZo+qso5Hc7FKWoUUPX9FfO+j2jl7vT1nu7f9RK4OvVx24alEF/QZPbht44bAYdCG2zIRZq9gcJy53VkfqhtmJo1BwuNK6v5wxxv/KO7YI7aV6YiUVpYhzGlc1tCcGV/94vaw9+mZiyJIXPAmh8LexfGNxVKR0kx1m68wgJ7F3mcshkUvfA3K6R2y7yywBSUDEPjVeBnUxBmphApR23E1N07rhGpEvlGjdSZsxdGDNHiWnMDEoASwglMZP92iATnLFmGeV8KBLgZqIHI2sOi8jennd56Eag6fV1QQ1BAkkEAPsai7mij69DdYZNY23QRVJFdQvlLWyKBEcfLWCmuTIcoUMVo1zHtLfbyS3fawIm6pfAn2B0NrjE/xebZV53DcThhAUDxZrzgA== X-Forefront-PRVS: 014304E855 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(199003)(377454003)(24454002)(189002)(230700001)(50466002)(31686004)(5660300001)(54356999)(23746002)(8676002)(50986999)(76176999)(4001350100001)(105586002)(4326007)(65826007)(229853002)(42186005)(106356001)(189998001)(68736007)(39410400001)(81166006)(86362001)(83506001)(7416002)(38730400001)(64126003)(97736004)(101416001)(33646002)(117156001)(65956001)(65806001)(7846002)(66066001)(6666003)(77096006)(733004)(92566002)(36756003)(6116002)(5001770100001)(2906002)(47776003)(81156014)(39450400002)(305945005)(2950100002)(7736002)(6486002)(31696002)(3846002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1192;H:[192.168.1.129];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY4PR15MB1192;23:D86PAxFCsoccjSd0vmq2xvRnxF5kcUQYeEccw?= =?Windows-1252?Q?/ogTIOXH9jE/MBCpWE7mF+tssM/Lq1101NnlYD+QWcxa/qlYSCspch7e?= =?Windows-1252?Q?8Wkob5ZaKmcxaVt61nbEtaQP7LNiPSOrnewVKJ7BlO0P9jYnYGLE/Wfh?= =?Windows-1252?Q?HLsteVYDNRoV7diZhKtxtRfs5ZW9HyvTk059bYwFQZjLP6PeA1T23Iyy?= =?Windows-1252?Q?otXmG1+ECyDohrRl+EKSze7ybCDsCwozZEvRn+SztzVCrtRc/c4ohzEJ?= =?Windows-1252?Q?Y5jFLYKEjvVjk5pmxwfefIy2jPo7DC0jgnPJeDnQSkTpuspCbJEZA+t6?= =?Windows-1252?Q?KfIoK8wqRYPGyN4bMVDcayLNiqV6EjD73LwvgzKpoE2ZeXLRTMkIQqj1?= =?Windows-1252?Q?DJ7NlN1U1VtVgAhpxLf4VDByj7MgjovmU9sR3bOjzpeBXRDtCd5dvYOe?= =?Windows-1252?Q?DpZI88R/oxhJJ9X1kBt5C3XoPUSEdZq5EAyW64bPYt5gDkUzB79/81v6?= =?Windows-1252?Q?e+yEndVVIDDFsR8eSBGURFUI3Vj3smUDBocjggqJOLPaTmPh7uPunqqR?= =?Windows-1252?Q?VL+fyWXjvQHfj7B6N6YuwlJg1EVxQ/7tIkf0Cvx682VVpOJA7XkQPbXm?= =?Windows-1252?Q?dbg3pSRDSGdgngNA39tFnANnI+hl6ygBUqaqV5ThqYqS5oin4sKSmE17?= =?Windows-1252?Q?zwBAp9rLgJeO+3LutOOTsJMqQGF3qrZ+CILLkM2oJ8TshWN1c3c43IQu?= =?Windows-1252?Q?KKXvEkgjF3sZ7QTLvAy3foyY8/qGf51J6tFJYxFRBH0tL0+T3jVVAFll?= =?Windows-1252?Q?a7bNwYSdlgvpAuH6DpgCTosaQdE8ydbWhtDChqEOarFegx4d+f+14tGv?= =?Windows-1252?Q?yghipyHHrBrjgm4LtwLnp5vkeBj9E8lDSqcMJa2PmiS33gYWilHjUU9F?= =?Windows-1252?Q?E88Sq8DOlzLXwJDrBfABnjHzY10mYXIgPI2eyLbcFEhBPGD/AFHosLqX?= =?Windows-1252?Q?ith5MBL+COmXU3yD421l0iCe/HqX4clBzY62O/fc2AtF+cre+Fr9BC37?= =?Windows-1252?Q?KaD4lk/LMgDCL+6R3XGVvW6aw5PO0rLkB4/6HTgPbhcE4BhzCUPTSihI?= =?Windows-1252?Q?HogjNobtTFRFWrVI+64tAz0/NglFuUEn4vzN71QqMygKPwnADXSC64Uz?= =?Windows-1252?Q?/fphCS4GvtL5V5qqMXdJwbY3qmVXUgNJYLZ+lQJxXG4XYjS9uo+hpVoa?= =?Windows-1252?Q?klaD/EVEcZV3y96zUhBN7MQABBE8KztiK4WUVOb0FbzXOJUD3GJxrS+a?= =?Windows-1252?Q?ysT68MFIa8lppji0H+vEXWwvkW/h7U1tP253hLnZzX4zWQ026S8AUkEO?= =?Windows-1252?Q?wphNgAEUBQrEt0zUaDaezpJT5/bVsxGS2qpF5Ma961c1RQqUHjO2TMlE?= =?Windows-1252?Q?JSBxKBvtiOusYpxRO35SQhPVl4YwnyE4Z66ZpZdQoHfPF8gohGDfqCD4?= =?Windows-1252?Q?H3F0ncU9BADzyc2Ke8LQCRzWQzHWBuGIc7mFdHL/E1zrZvuzw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1192;6:pppvSjTcnD6LqnDfpMwvjHy3Kka21SvJSdA+rpWofjj/cU9AP0pT5KbtRaCa0uOoHZ3m8bsLUA825Ck6j2HveDNDXYbqIDPvjLbl06zYzGirlx4bpSa1fn6ExCU+iqGxZN8E4gaTePmdTGVN4piciLqUCR/elZESUfMSrQAIgv2zHCF+zcCq/9wr6Bvk1h8dJ5ZwdswvTaQF1nsR1udA13cI/tVZkDZPLq2FqR5OU0jaq06iLS6G9YegrSrDMZ918ary4ZZwwCAaYoTyJsOsd+SJHMsHsubPQrHKbU8V+bUM0Jo1O4KkOLYR55pHDHCIFj0YKQNLh/E3VY9WLP/biDDRR48r4bi7BVJLpeukYYg=;5:HbMLJ9z0Mm3CL6/GCv70wKc+NFl7BPQQ4EoWfE2Db7OGfyzvZeg6hC8tj11uai7BDZad5iz5R4lcEPaLPscsa+y+3HIKBqWXj5Up2Zu28SSO+GFy1cTMWwqPIXkVYvJgKckWumP0B2no/YsTI302DQ==;24:25W5D5Hf44Lmv6wAB4ezf10YrYg45xm3i6M1v6zxo5o+HG3R3gTQ9toiOsJ6O81Oxmccy4wfiZHatwpesi3NTwjofJzj0nXRIeI2J57LENg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1192;7:MKvCdjydhncz0Z3mB+fb6lmb+pYnOXO8Tw7DFVD99UrTDsYLgmil7ZFch/pnXy6Cd4KFgt97ks09+V7zpk3/ZGAyEafM0uialDdvN04WzS6mEJMMs8anOzP2Lb2znx0w46cbdexXb462JuqoM5JY7mk2AsB2i0/TirQHyegt0kgY73t2Uo/LZCUXoLGY+NXAYjfPgRZQcbw2GWD++/2opLIggDPIqPtOir6JwvSi+qswptTHMYLC2mJjHnk21TrP+UzSrr6JJZqZ8TZiyrAHUHwgLeQnUK4yKqZdB0tEotuA0Ctvp/g6rin1j2/xXI4Rl0/cq47K/QSFscgeWYux2zp2+MoJnIillMa1bXVOz7c=;20:fa0b/g5dlgyaBEbqCsuPxnnY/0Oc4O2rpUsFGA8jNZoGEhaO90VPGUo/pMVOjuz0DvnR/tIpkjWMh/GH/vnO6LiaGMcIwP75XypV/hYQqLfta0DNLIOJpAaccF9tjUoB6pmt4RrDo/4HO++2QRgNYx/PL9BOv8LGFzbsD5WSHjc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 15:02:02.4347 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1192 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-01_12:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 585 Lines: 14 On 11/30/2016 07:10 PM, Pan Bian wrote: > Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188531. In function > mtip_block_initialize(), variable rv takes the return value, and its > value should be negative on errors. rv is initialized as 0 and is not > reset when the call to ida_pre_get() fails. So 0 may be returned. > The return value 0 indicates that there is no error, which may be > inconsistent with the execution status. This patch fixes the bug by > explicitly assigning -ENOMEM to rv on the branch that ida_pre_get() > fails. Thanks, applied for 4.10. -- Jens Axboe