On Tue, 7 Oct 2003 15:30:36 +0400 (MSD) kuznet@ms2.inr.ac.ru wrote: > > For example, I think this patch would solve all the problems. > > It is the thing which netlink_set_err makes, actually. I know, but it wants to do a group+pid match which does not coincide with what we want here which is a protocol+pid match. > + sock_put(sk); Indeed. Here is fixed patch, are you OK with this? --- net/netlink/af_netlink.c.~1~ Tue Oct 7 04:04:55 2003 +++ net/netlink/af_netlink.c Tue Oct 7 04:33:05 2003 @@ -898,8 +898,18 @@ size = NLMSG_SPACE(4 + NLMSG_ALIGN(nlh->nlmsg_len)); skb = alloc_skb(size, GFP_KERNEL); - if (!skb) + if (!skb) { + struct sock *sk; + + sk = netlink_lookup(in_skb->sk->sk_protocol, + NETLINK_CB(in_skb).pid); + if (sk) { + sk->sk_err = ENOBUFS; + sk->sk_error_report(sk); + sock_put(sk); + } return; + } rep = __nlmsg_put(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, NLMSG_ERROR, sizeof(struct nlmsgerr)); - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html