All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Eric Paris <eparis@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: audit_tree: sleep inside atomic
Date: Fri, 03 Sep 2010 15:52:30 +0200	[thread overview]
Message-ID: <4C80FD9E.5040408@gmail.com> (raw)
In-Reply-To: <4C1F8217.5020909@gmail.com>

Ideas, comments?

On 06/21/2010 05:15 PM, Jiri Slaby wrote:
> Hi,
> 
> stanse found a sleep inside atomic added by the following commit:
> commit fb36de479642bc9bdd3af251ae48b882d8a1ad5d
> Author: Eric Paris <eparis@redhat.com>
> Date:   Thu Dec 17 20:12:05 2009 -0500
> 
>     audit: reimplement audit_trees using fsnotify rather than inotify
> 
>     Simply switch audit_trees from using inotify to using fsnotify for it's
>     inode pinning and disappearing act information.
> 
>     Signed-off-by: Eric Paris <eparis@redhat.com>
> 
> 
> In untag_chunk, there is
>   spin_lock(&entry->lock);
>   ...
>   new = alloc_chunk(size);
>   ...
>   spin_unlock(&entry->lock);
> 
> with
> static struct audit_chunk *alloc_chunk(int count)
> {
>   struct audit_chunk *chunk;
>   ...
>   chunk = kzalloc(size, GFP_KERNEL);
> 
> But this can sleep. How big the allocations are? Could it be ATOMIC or
> moved outside the spinlock?
> 
> thanks,
-- 
js

  reply	other threads:[~2010-09-03 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 15:15 audit_tree: sleep inside atomic Jiri Slaby
2010-09-03 13:52 ` Jiri Slaby [this message]
2010-09-14  0:05   ` Andrew Morton
2010-09-15 20:08     ` Eric Paris
2010-10-30  6:21       ` Al Viro

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=4C80FD9E.5040408@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.