From mboxrd@z Thu Jan 1 00:00:00 1970 From: srinivas.kandagatla@linaro.org (Srinivas Kandagatla) Date: Sun, 04 Oct 2015 15:40:52 +0100 Subject: [PATCH 4/4] nvmem: sunxi: Check for memory allocation failure In-Reply-To: <20151004110421.GB7110@kroah.com> References: <1443616298-17389-1-git-send-email-srinivas.kandagatla@linaro.org> <1443616591-17867-1-git-send-email-srinivas.kandagatla@linaro.org> <20151004110421.GB7110@kroah.com> Message-ID: <56113A74.1090407@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 04/10/15 12:04, Greg KH wrote: > On Wed, Sep 30, 2015 at 01:36:31PM +0100, Srinivas Kandagatla wrote: >> From: Maxime Ripard >> >> The sunxi_sid driver doesn't check for kmalloc return status before >> derefencing the returned pointer, which could lead to a NULL pointer >> dereference if kmalloc failed. Check for its return code to make sure it >> deosn't happen. >> >> Reported-by: Dan Carpenter >> Signed-off-by: Maxime Ripard >> --- >> drivers/nvmem/sunxi_sid.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) > > No signed-off-by: from you on this patch? > Oops!! My bad I missed the sign-off. Thanks for taking this patch, I will make sure I will recheck this before sending. --srini > :( > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751838AbbJDOlA (ORCPT ); Sun, 4 Oct 2015 10:41:00 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36489 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbbJDOk7 (ORCPT ); Sun, 4 Oct 2015 10:40:59 -0400 Message-ID: <56113A74.1090407@linaro.org> Date: Sun, 04 Oct 2015 15:40:52 +0100 From: Srinivas Kandagatla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Greg KH CC: maxime.ripard@free-electrons.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 4/4] nvmem: sunxi: Check for memory allocation failure References: <1443616298-17389-1-git-send-email-srinivas.kandagatla@linaro.org> <1443616591-17867-1-git-send-email-srinivas.kandagatla@linaro.org> <20151004110421.GB7110@kroah.com> In-Reply-To: <20151004110421.GB7110@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/10/15 12:04, Greg KH wrote: > On Wed, Sep 30, 2015 at 01:36:31PM +0100, Srinivas Kandagatla wrote: >> From: Maxime Ripard >> >> The sunxi_sid driver doesn't check for kmalloc return status before >> derefencing the returned pointer, which could lead to a NULL pointer >> dereference if kmalloc failed. Check for its return code to make sure it >> deosn't happen. >> >> Reported-by: Dan Carpenter >> Signed-off-by: Maxime Ripard >> --- >> drivers/nvmem/sunxi_sid.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) > > No signed-off-by: from you on this patch? > Oops!! My bad I missed the sign-off. Thanks for taking this patch, I will make sure I will recheck this before sending. --srini > :( >