From: Jesper Juhl Date: Sat, 30 Oct 2010 16:37:16 +0000 (+0200) Subject: MIPS: VPE loader: Check vmalloc return value in vpe_open X-Git-Tag: v2.6.37-rc7~25^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=863abad4f644b6c12bc8176206b35fa7e7cfe1a9;p=pandora-kernel.git MIPS: VPE loader: Check vmalloc return value in vpe_open The return value of the vmalloc() call in arch/mips/kernel/vpe.c::vpe_open() is not checked, so we potentially store a null pointer in v->pbuffer. Add a check for a null return and then return -ENOMEM in that case. [Ralf: The check added by Jesper's original patch is where it logically should be. Adding it eleminated the need for the checks in a few other places, so I removed them. There still is a zillion of other things that need to be fixed in this file / API.] Signed-off-by: Jesper Juhl Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1747/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed