[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201003221444.JID21821.FQJOSLFMOFtHOV@I-love.SAKURA.ne.jp>
Date:	Mon, 22 Mar 2010 14:44:31 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	dhowells@...hat.com
Cc:	netdev@...r.kernel.org
Subject: [PATCH 2.6.34-rc2] rxrpc: Check allocation failure.
alloc_skb() can return NULL.
Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.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;
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists
 
