]> git.baikalelectronics.ru Git - kernel.git/commit
[NETLINK]: Fix a severe bug
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Fri, 10 Feb 2006 00:40:11 +0000 (16:40 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 10 Feb 2006 00:43:38 +0000 (16:43 -0800)
commit0389f372494c7ef543031fe362dfda9363e3dc60
tree40e3bf28a3fa36f20b4625c241ca14abb0c1a00d
parentbf6a1276c7145d612fbb62f2837d74a92f3ca1fd
[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>
include/linux/netlink.h
ipc/mqueue.c
net/netlink/af_netlink.c