mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Linux Audit Discussion <linux-audit@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.12-rc4-mm2 - sleeping function called from invalid context at mm/slab.c:2502
Date: Tue, 17 May 2005 09:55:28 -0700	[thread overview]
Message-ID: <20050517165528.GB27549@shell0.pdx.osdl.net> (raw)
In-Reply-To: <200505171624.j4HGOQwo017312@turing-police.cc.vt.edu>

* Valdis.Kletnieks@vt.edu (Valdis.Kletnieks@vt.edu) wrote:
> It threw 5 of them in short succession.  Different entry points into
> avc_has_perm(). Here's the tracebacks:

I'm guessing this is from my change to use single skb for audit buffer
instead of a temp buffer.

> [4295584.974000] Debug: sleeping function called from invalid context at mm/slab.c:2502
> [4295584.974000] in_atomic():1, irqs_disabled():0

This is gfp_any() flag that's used here, which I think is the problem.

> [4295584.974000]  [<c01035a8>] dump_stack+0x15/0x17
> [4295584.974000]  [<c013ba6d>] kmem_cache_alloc+0x1e/0x6a
> [4295584.974000]  [<c02de4fa>] skb_clone+0x14/0x183
> [4295584.974000]  [<c02ef64a>] netlink_unicast+0x7d/0x171

Here and up we are in netlink code which does netlink_trim to reduce the
skb data size before queing to socket.  This does skb_clone with
gfp_any() flag.  We aren't in softirq, so we get GFP_KERNEL flag set
even though in_atomic() is true (spin_lock held I'm assuming).

> [4295584.974000]  [<c0130947>] audit_log_end_fast+0xf5/0x188
> [4295584.974000]  [<c01c3c56>] avc_audit+0x94d/0x958
> [4295584.974000]  [<c01c3ffb>] avc_has_perm+0x3b/0x48
> [4295584.974000]  [<c01c8022>] selinux_socket_unix_stream_connect+0x6f/0xa8
> [4295584.974000]  [<c032b740>] unix_stream_connect+0x228/0x482
> [4295584.974000]  [<c02dbab6>] sys_connect+0x6a/0x81
> [4295584.974000]  [<c02dc23b>] sys_socketcall+0x6f/0x166
> [4295584.974000]  [<c01026cf>] sysenter_past_esp+0x54/0x75

  reply	other threads:[~2005-05-17 16:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 16:24 Valdis.Kletnieks
2005-05-17 16:55 ` Chris Wright [this message]
2005-05-17 17:04   ` David Woodhouse
2005-05-17 17:43     ` Chris Wright
2005-05-18  8:30       ` Herbert Xu
2005-05-18 17:00         ` Chris Wright
2005-05-18 17:52           ` David Woodhouse
2005-05-18 21:29             ` Herbert Xu
2005-05-17 18:01   ` Valdis.Kletnieks
2005-05-19 11:34 ` David Woodhouse
2005-05-19 18:45   ` Valdis.Kletnieks
2005-05-20 14:30     ` Valdis.Kletnieks
2005-05-20 14:59       ` David Woodhouse
2005-05-20 15:09         ` Stephen Smalley
2005-05-20 15:36           ` David Woodhouse
2005-05-20 16:40             ` Stephen Smalley
2005-05-20 16:55               ` David Woodhouse
2005-05-20 16:58                 ` Stephen Smalley
2005-05-20 17:26                 ` Stephen Smalley
2005-05-20 23:27                   ` David Woodhouse
2005-05-20 17:01               ` Chris Wright
2005-05-20 17:05                 ` Stephen Smalley
2005-05-20 17:19                   ` Chris Wright
2005-05-20 17:05               ` David Woodhouse
2005-05-20 17:06                 ` Stephen Smalley
2005-05-20 16:41             ` Chris Wright

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=20050517165528.GB27549@shell0.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®