DORMANTno replies

[PATCH 2.6.34-rc2] rxrpc: Check allocation failure.

From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: 2010-03-22 05:44:33

alloc_skb() can return NULL.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 net/rxrpc/ar-accept.c |    5 +++++
 1 file changed, 5 insertions(+)
--- linux-2.6.34-rc2.orig/net/rxrpc/ar-accept.c
+++ linux-2.6.34-rc2/net/rxrpc/ar-accept.c
@@ -88,6 +88,11 @@ static int rxrpc_accept_incoming_call(st
 
 	/* get a notification message to send to the server app */
 	notification = alloc_skb(0, GFP_NOFS);
+	if (!notification) {
+		_debug("no memory");
+		ret = -ENOMEM;
+		goto error;
+	}
 	rxrpc_new_skb(notification);
 	notification->mark = RXRPC_SKB_MARK_NEW_CALL;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help