]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
gru: allocation may fail in quicktest1()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 23 Sep 2009 22:57:33 +0000 (15:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Sep 2009 14:21:05 +0000 (07:21 -0700)
The allocation may fail.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/sgi-gru/grukservices.c

index 79689b10f937e0b8405a6a3568d5503c532d64a9..766e21e15574c75ceba18828a4d492ac6a90a189 100644 (file)
@@ -937,6 +937,8 @@ static int quicktest1(unsigned long arg)
 
        /* Need  1K cacheline aligned that does not cross page boundary */
        p = kmalloc(4096, 0);
+       if (p == NULL)
+               return -ENOMEM;
        mq = ALIGNUP(p, 1024);
        memset(mes, 0xee, sizeof(mes));
        dw = mq;