[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CEE6BB42CAD6E947908279175AF8470A025A68D366@EXDCVYMBSTM006.EQ1STM.local>
Date: Fri, 7 May 2010 20:57:39 +0200
From: Linus WALLEIJ <linus.walleij@...ricsson.com>
To: Steven Liu <lingjiujianke@...il.com>,
"nigel@...onice.net" <nigel@...onice.net>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Check kmalloc return value before use the buffer
[Steven]
> the code in arch/arm/mach-u300/dummyspichip.c is
>
> bigtxbuf_virtual = kmalloc(DMA_TEST_SIZE, GFP_KERNEL);
> if (bigtxbuf_virtual == NULL) {
> status = -ENOMEM;
> goto out;
> }
> bigrxbuf_virtual = kmalloc(DMA_TEST_SIZE, GFP_KERNEL);
>
>
> if kmalloc memory space for bigrxbuf_virtual is NULL, when it have
> kmalloc DMA_TEST_SIZE memory space for bigtxbuf_virtual,so ,if kmalloc
> memory for bigtxbuf_virtual success and kmalloc memory for
> bigrxbuf_virtual faild,i think we must kfree bigtxbuf_virtual memory
Ha, I also misread tx for rx, sorry.
Acked-by: Linus Walleij <linus.walleij@...ricsson.com>
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists