All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru
Subject: Re: [PATCH] netlink: fix for too early rmmod
Date: Tue, 02 Feb 2010 15:55:25 +0100	[thread overview]
Message-ID: <4B683CDD.4050804@trash.net> (raw)
In-Reply-To: <20100130200505.GA5318@x200>

Alexey Dobriyan wrote:
> Netlink code does module autoload if protocol userspace is asking for is
> not ready. However, module can dissapear right after it was autoloaded.
> Example: modprobe/rmmod stress-testing and xfrm_user.ko providing NETLINK_XFRM.
> 
> netlink_create() in such situation _will_ create userspace socket and
> _will_not_ pin module. Now if module was removed and we're going to call
> ->netlink_rcv into nothing:
> 
> BUG: unable to handle kernel paging request at ffffffffa02f842a
> 					       ^^^^^^^^^^^^^^^^
> 	modules are loaded near these addresses here
> 
> ...
> 
> If module was quickly removed after autoloading, return -E.
> 
> Return -EPROTONOSUPPORT if module was quickly removed after autoloading.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
> 	NOTE: due to commit 513c25000005257e5474f261bf27d4a3c1dff1e3
> 	"[NETLINK]: Don't prevent creating sockets when no kernel socket is registered"
> 	error should probably be -ENOENT, but I have no idea what this
> 	pam-audit thing is.

Quoting from the thread back then (couldn't find a public reference):

> FC4 includes a pam-0.77-audit.patch which adds a pam module that
> uses libaudit to probe for audit availability. It calls audit_open
> and ignores connection refused but returns an pam error for all
> other errors.

The current version of libaudit properly checks for EPROTONOSUPPORT,
but I don't know when this was fixed and whether we can assume the
broken code is not used anymore.

  reply	other threads:[~2010-02-02 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-30 20:05 [PATCH] netlink: fix for too early rmmod Alexey Dobriyan
2010-02-02 14:55 ` Patrick McHardy [this message]
2010-02-04  2:14   ` 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=4B683CDD.4050804@trash.net \
    --to=kaber@trash.net \
    --cc=adobriyan@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --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.