[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1257762132.29454.161.camel@johannes.local>
Date: Mon, 09 Nov 2009 11:22:12 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Patrick McHardy <kaber@...sh.net>
Cc: netdev <netdev@...r.kernel.org>, Jouni Malinen <j@...fi>,
Thomas Graf <tgraf@...g.ch>
Subject: Re: [RFC] netlink: add socket destruction notification
On Fri, 2009-11-06 at 16:37 +0100, Patrick McHardy wrote:
> >> This seems pretty similar to the NETLINK_URELEASE notifier invoked
> >> in netlink_release(). Wouldn't that one work as well?
> >
> > Hmm, it does seem similar, thanks for pointing it out. What exactly does
> > the condition
> > if (nlk->pid && !nlk->subscriptions) {
> >
> > mean though?
>
> nlk->pid is non-zero for bound sockets, which is basically any
> non-kernel socket which has either sent a message or explicitly
> called bind(). nlk->subscriptions is zero for sockets not bound
> to multicast groups.
>
> So effectively it invokes the notifier for all bound unicast
> userspace sockets. Not sure why it doesn't invoke the notifier
> for sockets that are used for both unicast and multicast
> reception. If that is a problem I think the second condition
> could be removed.
Thanks for the explanation. I think we'd need the second condition
removed, I don't see a reason to force a socket to not also have
multicast RX if it's used for any of the purposes we're looking at this
for. Guess we need to audit the callees to determine whether that's ok.
Can you quickly explain the difference between release and destruct?
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)
Powered by blists - more mailing lists