提交 9e5f1138 编写于 作者: R Roel Kluin 提交者: Linus Torvalds

gru: allocation may fail in quicktest1()

The allocation may fail.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NJack Steiner <steiner@sgi.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f8679af8
...@@ -937,6 +937,8 @@ static int quicktest1(unsigned long arg) ...@@ -937,6 +937,8 @@ static int quicktest1(unsigned long arg)
/* Need 1K cacheline aligned that does not cross page boundary */ /* Need 1K cacheline aligned that does not cross page boundary */
p = kmalloc(4096, 0); p = kmalloc(4096, 0);
if (p == NULL)
return -ENOMEM;
mq = ALIGNUP(p, 1024); mq = ALIGNUP(p, 1024);
memset(mes, 0xee, sizeof(mes)); memset(mes, 0xee, sizeof(mes));
dw = mq; dw = mq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册