lkml.org 
[lkml]   [2010]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectaudit_tree: sleep inside atomic
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


\
 
 \ /
  Last update: 2010-06-21 17:17    [W:0.042 / U:10.988 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site