Re: [CRED bug?] 2.6.29-rc3 don't survive on stress workload

From: Serge E. Hallyn
Date: Thu Feb 12 2009 - 10:56:34 EST


Quoting David Howells (dhowells@xxxxxxxxxx):
> KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
>
> > but perhaps I am merely lucky guy.
>
> Or perhaps Serge's patch fixes it - as I said I don't have it applied - though
> I don't see exactly why it should fix this problem...

I believe it was because

1. put_user_ns() was being called before the uid (which
was in the init_user_ns) was unhashed

2. alloc_uid would race in before the unhash, find
the hashed uid, and reuse it - without doing
another get_user_ns().

so a reference was lost.

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/