All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Akinobu Mita <mita@miraclelinux.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] fix use after free in netlink_kernel_create()
Date: Sun, 13 Aug 2006 20:49:06 +0200	[thread overview]
Message-ID: <44DF7422.2090904@trash.net> (raw)
In-Reply-To: <20060813104405.a5c8db00.akpm@osdl.org>

Andrew Morton wrote:
> On Sun, 13 Aug 2006 13:52:58 +0200
> Patrick McHardy <kaber@trash.net> wrote:
> 
>>Quite a few users of netlink_kernel_create will panic when creating
>>the socket fails (rtnetlink for example, which is always present),
>>so you might as well call panic here directly.
> 
> 
> That's a bit lame.  Panicing at do_initcalls() time is OK (something is
> seriously screwed anyway) but we usually try to handle the ENOMEM nicely if
> it happens at modprobe-time.


The users I looked at can't be built as modules (rtnetlink, genetlink,
audit subsystem), I'm not aware of any modules panicing on
netlink_kernel_create failure. But all of netlink, genetlink and
rtnetlink are always built-in when CONFIG_NET=y, so we might as well
panic here.


  reply	other threads:[~2006-08-13 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-13 10:15 [PATCH] fix use after free in netlink_kernel_create() Akinobu Mita
2006-08-13 11:52 ` Patrick McHardy
2006-08-13 17:44   ` Andrew Morton
2006-08-13 18:49     ` Patrick McHardy [this message]
2006-08-14  4:02       ` David Miller

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=44DF7422.2090904@trash.net \
    --to=kaber@trash.net \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mita@miraclelinux.com \
    --cc=netdev@vger.kernel.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.