Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
[pandora-kernel.git] / net / tipc / socket.c
index 1ea64f0..cfb20b8 100644 (file)
@@ -40,9 +40,9 @@
 #include <linux/socket.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
-#include <linux/slab.h>
 #include <linux/poll.h>
 #include <linux/fcntl.h>
+#include <linux/gfp.h>
 #include <asm/string.h>
 #include <asm/atomic.h>
 #include <net/sock.h>
@@ -1322,8 +1322,10 @@ static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf)
        if (!sock_owned_by_user(sk)) {
                res = filter_rcv(sk, buf);
        } else {
-               sk_add_backlog(sk, buf);
-               res = TIPC_OK;
+               if (sk_add_backlog(sk, buf))
+                       res = TIPC_ERR_OVERLOAD;
+               else
+                       res = TIPC_OK;
        }
        bh_unlock_sock(sk);