aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>2006-02-09 19:40:11 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-02-09 19:43:38 -0500
commita70ea994a0d83fd0151a070be72b87d014ef0a7e (patch)
tree40e3bf28a3fa36f20b4625c241ca14abb0c1a00d /include
parentad91e6fa0d331e419e4692d146cdc04e594a5bea (diff)
[NETLINK]: Fix a severe bug
netlink overrun was broken while improvement of netlink. Destination socket is used in the place where it was meant to be source socket, so that now overrun is never sent to user netlink sockets, when it should be, and it even can be set on kernel socket, which results in complete deadlock of rtnetlink. Suggested fix is to restore status quo passing source socket as additional argument to netlink_attachskb(). A little explanation: overrun is set on a socket, when it failed to receive some message and sender of this messages does not or even have no way to handle this error. This happens in two cases: 1. when kernel sends something. Kernel never retransmits and cannot wait for buffer space. 2. when user sends a broadcast and the message was not delivered to some recipients. Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netlink.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 6a2ccf78a356..c256ebe2a7b4 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -160,7 +160,8 @@ extern int netlink_unregister_notifier(struct notifier_block *nb);
160 160
161/* finegrained unicast helpers: */ 161/* finegrained unicast helpers: */
162struct sock *netlink_getsockbyfilp(struct file *filp); 162struct sock *netlink_getsockbyfilp(struct file *filp);
163int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo); 163int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
164 long timeo, struct sock *ssk);
164void netlink_detachskb(struct sock *sk, struct sk_buff *skb); 165void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
165int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); 166int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol);
166 167