netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
commit9e9b5dce350fd6f34c2c6b7440951481fb594a29
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 18 Mar 2010 14:24:42 +0000 (18 14:24 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:02:08 +0000 (1 16:02 -0700)
tree28b0d6dc72d1e85f8f6bf7e88f145959997794a2
parent7532d2c8a05ad49913e05716e96c3b402e1ca8ae
netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()

[ Upstream commit 1a50307ba1826e4da0024e64b245ce4eadf7688a ]

Currently, ENOBUFS errors are reported to the socket via
netlink_set_err() even if NETLINK_RECV_NO_ENOBUFS is set. However,
that should not happen. This fixes this problem and it changes the
prototype of netlink_set_err() to return the number of sockets that
have set the NETLINK_RECV_NO_ENOBUFS socket option. This return
value is used in the next patch in these bugfix series.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/netlink.h
net/netlink/af_netlink.c