lkml.org 
[lkml]   [2003]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH - RFC] [1/2] 2.6 must-fix list - kernel error reporting
On Fri, 11 Jul 2003, David S. Miller wrote:

> > + /* Don't bother queuing skb if kernel socket has no input function */
> > + if (nlk->pid == 0 && !nlk->data_ready)
> > + goto no_dst;
> > +
>
> Oops, turns out this doesn't work. data_ready is never NULL, look at
> how netlink_kernel_create() works.

It's ok: sk->data_ready is never null, but nlk_sk(sk)->data_ready will be
null unless an input function is provided there.

> Also, the broadcast case probably needs to be handled
> too?

Netlink sockets created by netlink_kernel_create() do not subscribe to any
groups and are not broadcast to.

> As an aside, to be honest what's so wrong with the socket receive
> buffer filling up? The damage is limited to the receive buffer size
> of the kernel netlink socket, but that's it.

Agreed, it's not really harmful, but it's sloppy. Better to let the
application know that it can't send to the socket rather than let it keep
sending (with successful return codes) until the kernel socket buffer
fills up.


- James
--
James Morris
<jmorris@intercode.com.au>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [from the cache]
©2003-2011 Jasper Spaans