lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 03 Sep 2010 15:52:30 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Eric Paris <eparis@...hat.com>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: audit_tree: sleep inside atomic

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@...hat.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@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ