From: Nigel Cunningham <nigel@tuxonice.net>
To: Andy Isaacson <adi@hexapodia.org>
Cc: Steven Liu <lingjiujianke@gmail.com>,
Linus WALLEIJ <linus.walleij@stericsson.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Check kmalloc return value before use the buffer
Date: Tue, 11 May 2010 08:08:27 +1000 [thread overview]
Message-ID: <4BE883DB.1040504@tuxonice.net> (raw)
In-Reply-To: <20100510214946.GA4361@hexapodia.org>
Hi.
On 11/05/10 07:49, Andy Isaacson wrote:
> On Fri, May 07, 2010 at 03:17:39PM +0800, Steven Liu wrote:
>> bigrxbuf_virtual = kmalloc(DMA_TEST_SIZE, GFP_KERNEL);
>> + if (bigrxbuf_virtual == NULL) {
>> + status = -ENOMEM;
>> + kfree(bigtxbuf_virtual);
>> + goto out;
>> + }
>
> On Sat, May 08, 2010 at 11:27:09AM +1000, Nigel Cunningham wrote:
>>> Acked-by: Linus Walleij<linus.walleij@stericsson.com>
>>
>> Acked-by: Nigel Cunningham<nigel@tuxonice.net>
>
> NACK. Don't duplicate kfree(), instead do something like
Yeah... that is a better way of doing it.
Regards,
Nigel
next prev parent reply other threads:[~2010-05-10 22:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 2:41 [PATCH] Check kmalloc return value before use the buffer Steven Liu
2010-05-07 6:52 ` Linus WALLEIJ
2010-05-07 7:16 ` Steven Liu
2010-05-07 7:17 ` Steven Liu
2010-05-07 9:37 ` Nigel Cunningham
2010-05-07 9:37 ` Nigel Cunningham
2010-05-07 9:47 ` Steven Liu
2010-05-07 9:51 ` Nigel Cunningham
2010-05-07 18:57 ` Linus WALLEIJ
2010-05-08 1:27 ` Nigel Cunningham
2010-05-08 8:56 ` Steven Liu
2010-05-07 9:50 ` Steven Liu
2010-05-07 9:52 ` Nigel Cunningham
2010-05-07 9:55 ` Steven Liu
2010-05-10 21:49 ` Andy Isaacson
2010-05-10 22:08 ` Nigel Cunningham [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-05-07 9:05 Steven Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE883DB.1040504@tuxonice.net \
--to=nigel@tuxonice.net \
--cc=adi@hexapodia.org \
--cc=lingjiujianke@gmail.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox