[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p733bbp81p9.fsf@verdi.suse.de>
Date: 22 Aug 2006 13:11:30 +0200
From: Andi Kleen <ak@...e.de>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: Andrew Morton <akpm@...l.org>, ebiederm@...ssion.com, pj@....com,
saito.tadashi@...t.fujitsu.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] ps command race fix take2 [4/4] proc_pid_readdir
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> writes:
> proc_pid_readdir() by list_token.
>
> Remember 'where we are reading' by inserting a token in the list.
> It seems a bit complicated because of RCU but what we do is very simple.
>
What happens when you have multiple readers at the same time? Can't
the tokens then be mixed up?
>+ /* this small kmalloc() can fail in rare case, but readdir()
>+ * is not allowed to return ENOMEM. retrying is reasonable. */
Who disallows this? Such retry loops are normally discouraged
because they can lead to deadlocks in OOM situations.
I think it would be better to just return ENOMEM.
-Andi
-
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