From: Andrew Morton <akpm@linux-foundation.org>
To: Luca Tettamanti <kronos.it@gmail.com>
Cc: linux-kernel@vger.kernel.org, john@johnmccutchan.com,
rlove@rlove.org, eparis@redhat.com
Subject: Re: [PATCH] Fix inconsistent lock state in inotify
Date: Wed, 15 Apr 2009 12:25:32 -0700 [thread overview]
Message-ID: <20090415122532.0a0c5f24.akpm@linux-foundation.org> (raw)
In-Reply-To: <68676e00904150459q6cc34f9fjb9475937a4e73c71@mail.gmail.com>
On Wed, 15 Apr 2009 13:59:29 +0200
Luca Tettamanti <kronos.it@gmail.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.
next prev parent reply other threads:[~2009-04-15 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 19:25 [PATCH] Fix inconsistent lock state in inotify Luca Tettamanti
2009-04-14 23:13 ` Andrew Morton
2009-04-15 11:59 ` Luca Tettamanti
2009-04-15 19:25 ` Andrew Morton [this message]
2009-04-15 19:31 ` Eric Paris
2009-04-15 20:31 ` Andrew Morton
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=20090415122532.0a0c5f24.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=eparis@redhat.com \
--cc=john@johnmccutchan.com \
--cc=kronos.it@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rlove@rlove.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 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.