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]
Message-Id: <20090415122532.0a0c5f24.akpm@linux-foundation.org>
Date:	Wed, 15 Apr 2009 12:25:32 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Luca Tettamanti <kronos.it@...il.com>
Cc:	linux-kernel@...r.kernel.org, john@...nmccutchan.com,
	rlove@...ve.org, eparis@...hat.com
Subject: Re: [PATCH] Fix inconsistent lock state in inotify

On Wed, 15 Apr 2009 13:59:29 +0200
Luca Tettamanti <kronos.it@...il.com> wrote:

> >> +++ b/fs/notify/inotify/inotify_user.c
> >> @@ -220,7 +220,7 @@ static struct inotify_kernel_event * kernel_event(s32 wd, u32 mask, u32 cookie,
> >>                               rem = 0;
> >>               }
> >>
> >> -             kevent->name = kmalloc(len + rem, GFP_KERNEL);
> >> +             kevent->name = kmalloc(len + rem, GFP_NOFS);
> >>               if (unlikely(!kevent->name)) {
> >>                       kmem_cache_free(event_cachep, kevent);
> >>                       return NULL;
> >
> > Thanks.
> >
> > This is in fact a false positive and we plan to fix it via lockdep
> > annotation.
> 
> Well, I trust you on the "false positive", but a few line before there this:
> 
>   kevent = kmem_cache_alloc(event_cachep, GFP_NOFS);
> 
> so can kmem_cache_alloc also use GFP_KERNEL?

Yes, it looks that way.

umm, I think I'll merge your original patch as a reminder-to-self.
If the problem doesn't get fixed in a better way for 2.6.30 then I
might end up going with the GFP_NOFS approach.

But it's bad to weaken the memory allocation mode just to plug a lockdep
warning.
--
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