[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130316212351.GA21190@redhat.com>
Date: Sat, 16 Mar 2013 22:23:51 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Lucas De Marchi <lucas.de.marchi@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Paul Mackerras <paulus@...ba.org>, david@...son.dropbear.id.au,
Kees Cook <keescook@...omium.org>,
Serge Hallyn <serge.hallyn@...onical.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Feng Hong <hongfeng@...vell.com>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Subject: Re: [PATCH 0/2] finx argv_split() vs sysctl race
On 03/16, Andi Kleen wrote:
>
> > Perhaps rcu can be better, although a global rwsem looks simpler,
> > I dunno.
>
> It's a general problem with lots of sysctls.
> >
> > But argv_split() or its usage should be changed anyway, and GFP_KERNEL
> > won't work under rcu_read_lock().
>
> rcu strings has a helper function to copy the string for sleepy cases.
Then you need to pre-allocate, take rcu_read_lock(), copy, and check
that it actually fits the pre-allocated buffer. Not sure why the simple
rwsem is worse.
But I won't argue in any case
> > To me 1/2 looks as a simplification anyway, but I won't argue if we
> > decide to add rcu/locking and avoid this patch.
>
> Ok I'll revisit.
OK, but do you agree with 1/2?
Once again, this is subjective of course but imho this patch could be
considered as a cleanup/microoptimization, and it won't affect the rcu
changes.
Oleg.
--
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