Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752196AbdHHP1o (ORCPT ); Tue, 8 Aug 2017 11:27:44 -0400 Received: from mail-bn3nam01on0080.outbound.protection.outlook.com ([104.47.33.80]:48960 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752030AbdHHP1l (ORCPT ); Tue, 8 Aug 2017 11:27:41 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Subject: Re: crypto: ccp: use dma_mapping_error to check map error To: Pan Bian , "Lendacky, Thomas" , Herbert Xu , "David S. Miller" References: <1502199767-2578-1-git-send-email-bianpan2016@163.com> Cc: "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Gary R Hook Message-ID: Date: Tue, 8 Aug 2017 10:26:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1502199767-2578-1-git-send-email-bianpan2016@163.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR15CA0041.namprd15.prod.outlook.com (10.173.226.155) To CY4PR12MB1320.namprd12.prod.outlook.com (10.168.168.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2dd40a5-9724-4699-135c-08d4de720104 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR12MB1320; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1320;3:g0OSP2Eiebgc+V48DiAyAiFHW/9cHYX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K0kg3SVvicO4possf46A5RQcYJ+jQuXYY+6mZKL6MhIuG+Pw0lBqgP9vlnAAkR4OD5nBttRJ1luk8KaxMcjFCbzj3j0cwCYlPuMaFhFdSH33+GX2BnS6hWVMmFeo7Gg6XeUtWPDgOeXs5haT4HTlJVSMQ7hLXy/LF7yzYiXXlgqTyFEypmYvCIUjO+ySXJf42WqXN1hwlwBayTgqzTXSY1WLq8oeQv0UDYJkLfBJCgmccyMvssXmmRSh9/6krm35tNdwYOZVV9B4sfP0A3Ozn+0bKcYzhLhrhq9e9w8i16vIZXKJJu2r5faVysXgGFgnMs8/RLMSSQG+QsC8pYsVJQyN3IShx6kRSHWKPLN8it4bqVDGsz05eqrQGjT69hCcA4HVnDd+v/UXJZAoYMPAF7Iret6OK/uKShdy7Jma7XA== X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1320;20:uhYQ5Fgm/NEPPgAWE5xBho937R8MrURRaJgke4HDloYS3eIznBpsQAdT2evQ2EIsuKA8vfnXkf8A+AVh50zGh6/sfBOCNgQmy4tNCRz50uIACPDLGUAa3K18dg6MuOVo7I0498daY751wC0GO/xOSRy1qygNKOaE242N9cz9R2DhuJXGtureASK/3BdttRr9iKHQCiI4+sG6uDoVUPlprbBn2dSUGIp/+Fb6a1TBPE886Jn9k5IPm35A5P6j1ikTflHL40UXbMC9ZC3vkfev2d3MuUlXfiVyLk4BFXXRxjJNZPvQX7rlB4zNtG8/cwKTKJJULICbC8JoUc5iT+bu7PHBsbMlM2d8gviJZEsrk+EyBTgM+xNfn7RJxW9ZZdx6YXwJIG0gPO0TnYWlBXD9C6h0N7UmRxVlMcZM8zdR3ZuZgbnJq5wOr9LfpFR89g4JOfUu7TdUlYHxoVV4kXfGRngEYu3j2N6uXw2ODB/FWDR+c+3wNdsz7a2AMjwp05JB X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(130843839470238); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR12MB1320;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR12MB1320; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY4PR12MB1320;4:3ONUwW7rUaAdWEluMXtdGwZnFgOQBwDmnd8jD8?= =?Windows-1252?Q?cwY3zFCskAhxu8JxT5mYSDGexWGzxQ/Eci03ArNDBfY0YqAyMy0/QY6Z?= =?Windows-1252?Q?cNBssuSMlOM3HF0hgULUt2jf3vpSSPNjGspHjmrow6fa9hczlYh1XNOj?= =?Windows-1252?Q?zvB/wpDZ5JLXwLFg3EMb3KLNsU6cpokzesC+bHnGP2GcZgKdDSXzX61C?= =?Windows-1252?Q?1Jh8r5WTZNiyDNNz21v7/yt14r5QIDgJBEI2sFmlk+/3CCkUhgJmWEte?= =?Windows-1252?Q?perUNr7IpoYjfn16sYmpUmfSMPxGEW//0KESc9SUKEtgm7/VcX6x/Qsi?= =?Windows-1252?Q?6NZH4Y6MWMX9W+9mMe4AdDRu3S4gfhTJ6c7ks2E+E51hflCJ99PZnT9R?= =?Windows-1252?Q?6DLwcrFtjknmyv90BZJ92bTGnJHVxAjIaA/0x91xTN+rh1rVqc8Nt9+z?= =?Windows-1252?Q?tMC/Ug0JdrPmWvi3oAfDXNKZ3JlOryrV9/1+QumGth3AhSlu6QkK/LdF?= =?Windows-1252?Q?9nBbqrHk0N5bxMLpdgF4KWjLeU7PaHvh71+LF554YWnhNvfMFlA9GopL?= =?Windows-1252?Q?AdMxeQb2x1GZNL8im4tpi1dcMX3NCxZIeBKZNpyesgxt5yI9BmtvVtcz?= =?Windows-1252?Q?mFL92T9NjSul2LRYLiyW0M598uKBq03lf58wdO1e6WLLSEMp3hrA3y6H?= =?Windows-1252?Q?RtFJPXEb8Ap3gECmq4Lxcu+X7AndDEqN/yW+j02e6wiJepnqVXv4D+xS?= =?Windows-1252?Q?q5weg0CUoxa/XgSegacC97CPopuoGNDL+3Ihxy9iw9nOckUCb+L3tADQ?= =?Windows-1252?Q?2P7XjckumtLW6e1QYvwxqsV2QU83owmrDJtCnEintLyhe5q/QX+r2noW?= =?Windows-1252?Q?C9Lq5u6wPP9vHCVCG+Uzih0LifCuCp13Ge6YuWof13EAo08mZekezrEQ?= =?Windows-1252?Q?nMy027yEMWwL+BlQ0kfytj7QZHb9Kqws+ms1zfkDhRL9nZPRxm4ssbHE?= =?Windows-1252?Q?lN+uRKFIW3VFWNv0roH8fzUHhT4zeawi2D4WwN83VhovZjzn2YgMpLWQ?= =?Windows-1252?Q?06JmoDFuwicCjoDCTyePgcHBMcoRgB5wpLCtav1r6d21NirPhdhKGity?= =?Windows-1252?Q?GTwS+NejTXIhUz7EXV/y4QiF50Cw+HncaP0Sbq8BMCrLbGhsQf1owm+z?= =?Windows-1252?Q?FUVCeEHxq92sRqjJjTrVBSxtsk79o9SqoQQ6GegJf3AFXJ7CqGW4Ng79?= =?Windows-1252?Q?IqoMeouTDukXdbaCR9sjVc6KZhl/K2yXjtVqMTIQe7AXpigMdxbBHzTM?= =?Windows-1252?Q?NKAORudbEfD3h2sWIOv9ANrHWar1vM/2RSGvto2WXzNc3Wi9I92YHfKx?= =?Windows-1252?Q?XjOV0P0nll?= X-Forefront-PRVS: 03932714EB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39860400002)(39840400002)(39400400002)(39450400003)(39850400002)(39410400002)(24454002)(199003)(377454003)(189002)(230700001)(54906002)(4001350100001)(53936002)(42186005)(6486002)(97736004)(53546010)(86362001)(36756003)(77096006)(90366009)(47776003)(189998001)(31696002)(38730400002)(31686004)(575784001)(106356001)(81166006)(6246003)(81156014)(65956001)(23746002)(25786009)(72206003)(64126003)(33646002)(50466002)(2950100002)(229853002)(6116002)(68736007)(66066001)(478600001)(83506001)(305945005)(50986999)(101416001)(7736002)(7350300001)(76176999)(6666003)(54356999)(3846002)(105586002)(65806001)(8676002)(4326008)(5660300001)(2906002)(65826007);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1320;H:[10.236.19.127];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY4PR12MB1320;23:pw+JWIpcut8k0sylqGI3UB5ycg/JGZCacgncj?= =?Windows-1252?Q?yssgLnp9LhebZ8NpX63Vv9rQWckKDrITJPPk6+RjRSB/9Kjqp7d945JW?= =?Windows-1252?Q?PdNw8gbcOdjFaBFRm/Rxi2fMFfcxRjKbYUwXLKJim/1zTxOZxFBBIyYJ?= =?Windows-1252?Q?XSPBjPA8WhbHSC7TKjKRJ1UJDkqBlW1rJqEHvMHKvOI3SmcDLK1SjlEs?= =?Windows-1252?Q?0p43VoATmiwYGKauS28V9bByOJriWRRqPPkXGK3nHYl93OezTDV/lNF7?= =?Windows-1252?Q?XT/yKB/F8KaqOZf+JNAHhczEoXTBUfOMQb08VR48J1JLOHCpjd1QBLNw?= =?Windows-1252?Q?rzvqjV37dKMrNoNrvpvV8vl3v//b81AWFNEgPzQ16G3RknpKqrkRIeMf?= =?Windows-1252?Q?adn0c5kmqczlhte+/7uJVkSBxAgIYuMQrT95gzxWHA7hDAZETYz2YzQw?= =?Windows-1252?Q?36XqvSIT1tenEkWBO8Xlp5DGS5IhkPmscH6BtVNURflEHZRVS/zsgPrf?= =?Windows-1252?Q?iXEAAoHk56ZbfNEGOC7X/v5Xv/485iO95j7JDcRDgqV8OH0Cun/pdKPF?= =?Windows-1252?Q?lrieLbCqAolBaMLTlNbVZx+sCdHtVb1zJdZmXTefA61niZlp0XaKpk8t?= =?Windows-1252?Q?4VOumwx3giXZf+m6g7t7CPuDfDrO3sVs5K4w1PIAOAg+cEk8CDBahY4t?= =?Windows-1252?Q?ra6ongwhmLpIWm0LExPvbGOibvgDsuG5wMhCeXTTyUHSvZsXL0I3hZ0O?= =?Windows-1252?Q?XEIWtNTcYtQUfW78wjTrLP0Jq27Uesvam7z+8N1jYBqfyeJrjcstgVWE?= =?Windows-1252?Q?JcFfWQjAqRCRl4e5kfzeTGP1FvEQcbt/IivVJV1zjxtm9qnBqAqvXNIZ?= =?Windows-1252?Q?ex5bGxKYbsR0/ofBdvlVyY3rSRiVyVA6w0+rbEidt05se8JRvB4vHPlv?= =?Windows-1252?Q?MzRLBc3rfMMI+ptGkjamGl6pjE9Oj/4aCIgGxgyEzUAL9gbL0d2X1P2n?= =?Windows-1252?Q?GziJzv83FxEVjuQWG9MCJ3USBdcauwBdb7Jehabt9AWSGm96giLgg+26?= =?Windows-1252?Q?4dZfUXfyDlTh6FTc4sKcbb/mpMEbnem3bKoGRD9e5SoKVxVCMjqLI2yi?= =?Windows-1252?Q?0LOWOTNSgFrOgBKyqJ5nSwNXBwpkJQm2NvXt9NyB9PFviUxtZOVFTFj5?= =?Windows-1252?Q?yT9zHgF6lnseM6g7lr4nKJ1SGvFhpbiaArfAE2Y3nkgyXmNi/DIWDv7+?= =?Windows-1252?Q?6OFfFkYz59fA9dVyq/Fiv614A0IlOADOonQCFcZ1fVDiMow8s+DFZRra?= =?Windows-1252?Q?RaY68EZI58eWp7R3/n26OlJvuXUjdMHFbO9xgWDI1veem6UM426fJ751?= =?Windows-1252?Q?nDhW1wZ/Y+FxbXV1y1/DdKAUFXll1NakIrbkjcBmIVeCCSc1u+ifm04u?= =?Windows-1252?Q?VsRVAdfOoRdHtH8LdzsRfiW4wo3dS3ZUBQiMtvgMlVovJ2hH/ukxamFI?= =?Windows-1252?Q?jHs1QaAFp4SNRkyaP4zk4HfSqzPgrtPdRU23kju3BVhKJ7H/Zo/S20+X?= =?Windows-1252?Q?bb9xJjOIzBBGTQqlFaTCGJKHhzpj76zba/ssZhTx6VmoqqUUXVlShKwC?= =?Windows-1252?Q?4TCv3/TrtgSgtfAgcbwNUsUyWrGKrsByZHQuL4Dd6rb/Da6HzAd/vs3x?= =?Windows-1252?Q?vjKf4RysRKJTIeh9IIvh9R3nfWqzDv36rAFDLMwMoagQmD/5lBG?= X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY4PR12MB1320;6:WjfNztC7T5NFrEsYQ79QPydvnJcZMq2uw7Mcd1?= =?Windows-1252?Q?EQTR6HJ+jj0UaFFwyMKG79VE5PQlD9Zi8l4/jKXuWncHy+Xne4+mAZVX?= =?Windows-1252?Q?Pqu4LpVffgT0NVBLX+IAQGv+CioAy6CfHmCN6gQIjKBx0daG0LWC4o/v?= =?Windows-1252?Q?ktaA6YjHU2/A8AGpwf8Dj5UqSUrNfDRFTIN8q8+Gkz7ijA+gPwGl/nit?= =?Windows-1252?Q?KqRPgH+vb9HLKEVYOCeyICKOqDyu0e4+TaonjZSFK1vWy++tT+yK6Bcn?= =?Windows-1252?Q?JrVrH0bKe52aqdo+MAFcCjq+mPQiu0SF+cfkb73X2T4imzSLhQ7Uldbm?= =?Windows-1252?Q?4zKqzaKAODcH1rQC95TyaN2qy1MIlBsfowppN1Ir3oLc/dlbEQ9awQdz?= =?Windows-1252?Q?WSzYrJBp47iCEBZMBLCe7wS41eSrnp6D3/XLnMyT38PclHvzUykDjWUI?= =?Windows-1252?Q?IbUx+qMQXV2Xu14dOSi4DNQNBK5MJqlJgKmk6sj4jyHPGgFqRlQrcXqN?= =?Windows-1252?Q?2ikVD83lp6BmbLi/K5eofXTuabfB61In+0fDynbM0ZtkwRAdG9k9J7Dl?= =?Windows-1252?Q?whK1C440v1G1f0OAqMJaIAv96vcIBlCeCoDlsLvYDrHEVhoPf15aMFl+?= =?Windows-1252?Q?DpZ3elnYQVA0wB2Hve78boRcDeWjhVI4zy9/S9pe1LToF68lYtOoWIG7?= =?Windows-1252?Q?J2HpMnUBE3019WnoJUylWpDsv6X0MWKj7HiYUzSqud74tVXZB96eXec/?= =?Windows-1252?Q?AKEelTaxYkm7kPTfE52GM5DCiBB5+rCwRkbCQkQ4Q8oa5xGs42GgWPT5?= =?Windows-1252?Q?seuDXnBqRcDkqxP87Nh/FCKZgOsrLV4ThdokAE8QINKN8b4YWDYU8EGw?= =?Windows-1252?Q?Vin2y7jz3p2I0azZ9yxrVBCKICr+d4IM+fVOYBoh/0m0XscdkTjeSwHU?= =?Windows-1252?Q?k72XqW6VdDBwlCOJTQ8NBUm8WP+dXtMjGXL1ut28ZQn0kUzIJRJ2ozfH?= =?Windows-1252?Q?X4tQ8GrK5fq+USsQMeeFJtVJVYPrUMS9zADco9XKnHyofLfU3D4Cv97b?= =?Windows-1252?Q?USmcAlEQTAG0ythlOxd/JWZS2szVuZRlKY?= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1320;5:cZvgoRolFlAotYfrJhA3ox4Bn6NRuU4W5VwTQDexLPrOFFIzeF30O/d7hYVjWf6YGTJKLS7W755pgng/BCLfp3Qxt+5nuBRsTbkqAF5VPvcqR6nTw/q+WFQQntWSX+ri5AJuUsyG1cI97Oaji4c33oI3DZ8TM9noOaDNr5xcL46/VLhVG1/2RZ66VBOt1urT1+sBfDYz/jyyjXXP0BG6KYUPWI22Tiyq2uh+oJGY/59lLO/XUyW/4kheL9eGyOV4W2ZuCl3viPoFPrQf2tBT2HUOIzBrM2CLoc918Cl6jRDBjVrTtW0zhNAbDCuYwOa79YvqsSKTZWCxRrUV69giUUHedlGWaQsZDnluCZM6lc1efE3l8u3mpPONCofNqbZWtIJOeAfao7l3bmUvfJL2LB9t5e+QZmLT3sEfG//CUYqv/U9DmQEmnYYFxKkHuxZ7opkwIMI2YGNyG1rsIWvu1nL0c8YWtBJB9F4aBySXbLhgvy5MvJ5LkHqRgmOHUaBz;24:DR7AaxB1bLAlc/kVyff8Wc2vsCyZNWGRunuJVKILbkSHcrBh5pE2cYHSM9I7c8vLVpDeicEslJWxd4mZA/X0zrqUqfZIDeXccKxdzT/h1q0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1320;7:4dj82V2ZFOlIT5szdHXHmtRM0m5u48GkwQ++Oz6CY/UmCotGq0rveKEkByPTPDV7GnmuZFcokJMGJACCEJCastWmPbWPdMh1bf3S0sBhpYCcUcukPuUyqZHvAp4EhE7ua/8DRTGQr8wofUZ/NayKHXItr5vAUJTbu345sJwxbZHRdailChdHSqWes/LUSGELfHgV4jUwEGdDJzVfFhgWzh8oCE7GX/xQKEacB8Xvb8O759HcQriPkLpAOVf7UJJXNHySplQaBlns3R9HPNtBxNRZGONFoTUlxwKQXQr/EQjIWDFu3lL5l0oUrUHNt0YTwo6/bv7+anP8MwUGacRPL6LFksTHX8xdkznjE9ll3HSppxv4DeOgi+JCA8uIIzTzFkh3HOW0L4EbZnu7G4zVHyfFWJd5stl0Q4yQ5nBQ2UmAr3WzCg5YxCDvM1MfMfF0SOP9+jb89/JoXXrCYwOzOkE3ZIturFQKMvIFBbSdg1iWu7KoxXPB3x1Fv32LRjkRqTM9XlivObSgv3pxOddH+GgogBdpwMLzl7Xx0+uKKVyYfKNyX64UbcgjhmdeivCqIqurRsxhIBM+HEriEfujlPBbz7+Pu+V/HFV6rwrFcsVzdsRc8F3HzU3HRrEy+ZlXsQ3c3yLmT1QA13ieX9FJ3V6AAbRLapOu9auI14AMrtMKxycZVARGmOGh2CsBEPcqc8y4mhjJGb3bSqDftBtMlj5O27Mv/jhdJOIaQxw5OE0jZk3CjfB/eEmxGPQCprfmtMeg0XJaQ14PdZs1QgcEXzPbhkmNVRyQodWEv8qXETU= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1320;20:a6JfstR6rmgf2cXlD76IjIHGXZJQS6+KluGsjzA/XhISfEX2aN/RFOWQ541zVLSlX8MJ7vjQY1UtVR4xLcuojkLYCU6h+cZ/lEsYWyjcBnPy0xnEoJ1LMPoB3r6lh30DqN679zy83pETKHkTLsFjMna8Gjvu0405P3iGB/pLU7gNsq2hpdw7HWLL+IGZczDK9XcRY7++ofag6tX8ERtx7x39Wv7tkVRrSK1YUsE0G0gt209Wekc3cnezVju2e6o+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2017 15:27:38.3638 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1320 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 27 On 08/08/2017 08:42 AM, Pan Bian wrote: > The return value of dma_map_single() should be checked by > dma_mapping_error(). However, in function ccp_init_dm_workarea(), its > return value is checked against NULL, which could result in failures. > > Signed-off-by: Pan Bian Acked-by: Gary R Hook > --- > drivers/crypto/ccp/ccp-ops.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c > index c0dfdac..ca83d19 100644 > --- a/drivers/crypto/ccp/ccp-ops.c > +++ b/drivers/crypto/ccp/ccp-ops.c > @@ -168,7 +168,7 @@ static int ccp_init_dm_workarea(struct ccp_dm_workarea *wa, > > wa->dma.address = dma_map_single(wa->dev, wa->address, len, > dir); > - if (!wa->dma.address) > + if (dma_mapping_error(wa->dev, wa->dma.address)) > return -ENOMEM; > > wa->dma.length = len; >