From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755170AbbFTQeE (ORCPT ); Sat, 20 Jun 2015 12:34:04 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:2154 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754426AbbFTQd6 (ORCPT ); Sat, 20 Jun 2015 12:33:58 -0400 Message-ID: <558595D2.1040607@fb.com> Date: Sat, 20 Jun 2015 10:33:22 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Axel Lin , Matthew Wilcox CC: , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] block: nvme-scsi: Catch kcalloc failure References: <1434788954.21528.3.camel@ingics.com> In-Reply-To: <1434788954.21528.3.camel@ingics.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-06-20_02:2015-06-18,2015-06-20,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2015 02:29 AM, Axel Lin wrote: > res variable was initialized to -ENOMEM, but it's override by > nvme_trans_copy_from_user(). So current code returns 0 if kcalloc fails. > Fix it to return proper error code. Looks good to me, applied for 4.2. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/