All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Morris <jmorris@intercode.com.au>
To: "David S. Miller" <davem@redhat.com>
Cc: jkenisto@us.ibm.com, <linux-kernel@vger.kernel.org>,
	<netdev@oss.sgi.com>, <akpm@osdl.org>, <jgarzik@pobox.com>,
	<alan@lxorguk.ukuu.org.uk>, <rddunlap@osdl.org>,
	<kuznet@ms2.inr.ac.ru>
Subject: Re: [PATCH - RFC] [1/2] 2.6 must-fix list - kernel error reporting
Date: Sun, 13 Jul 2003 11:17:35 +1000 (EST)	[thread overview]
Message-ID: <Mutt.LNX.4.44.0307131052420.2146-100000@excalibur.intercode.com.au> (raw)
In-Reply-To: <20030711224142.557b5b5e.davem@redhat.com>

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>


  reply	other threads:[~2003-07-13  1:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-08 17:31 [PATCH - RFC] [1/2] 2.6 must-fix list - kernel error reporting Jim Keniston
2003-07-08 17:59 ` Andrew Morton
2003-07-08 19:22   ` Jim Keniston
2003-07-08 19:45   ` Jim Keniston
2003-07-10  4:42 ` James Morris
2003-07-10 19:08   ` Jim Keniston
2003-07-11 15:37     ` James Morris
2003-07-12  5:09       ` David S. Miller
2003-07-12  5:41       ` David S. Miller
2003-07-13  1:17         ` James Morris [this message]
2003-07-13  5:34           ` David S. Miller
2003-07-15 17:42           ` [PATCH] [1/2] kernel error reporting (revised) Jim Keniston
2003-07-15 17:45             ` [PATCH] [2/2] " Jim Keniston
2003-07-15 19:51             ` [PATCH] [1/2] " Andrew Morton
2003-07-15 23:10               ` kuznet
2003-07-17 19:13               ` Jim Keniston
2003-07-18  1:53                 ` James Morris
2003-07-18 17:06                   ` Jim Keniston
2003-07-18 23:29                   ` Jim Keniston
2003-07-19 23:52                     ` James Morris
     [not found] <3F0AFFE6.E85FF283@us.ibm.com.suse.lists.linux.kernel>
     [not found] ` <20030708105912.57015026.akpm@osdl.org.suse.lists.linux.kernel>
2003-07-08 19:14   ` [PATCH - RFC] [1/2] 2.6 must-fix list - kernel error reporting Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Mutt.LNX.4.44.0307131052420.2146-100000@excalibur.intercode.com.au \
    --to=jmorris@intercode.com.au \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=jkenisto@us.ibm.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.