Re: WARNING: at mm/slub.c:3357, kernel BUG at mm/slub.c:3413

From: Eric Dumazet
Date: Mon Nov 21 2011 - 13:39:09 EST


Le lundi 21 novembre 2011 Ã 18:35 +0100, Markus Trippelsdorf a Ãcrit :

> New one:

...

I was just wondering if you were using CONFIG_CGROUPS=y, and if yes, if
you could try to disable it.

css_get_next() looks very buggy, the read_lock()/read_unlock() protects
nothing at all, RCU rules are not respected.


commit c1e2ee2dc43657 (memcg: replace ss->id_lock with a rwlock) missed
the point of doing a true RCU conversion to get even better results, and
fact that previous code was buggy as well.

[ After rcu lookup, we must get a stable reference, then recheck the
key , or else we can manipulate something that was queued for deletion.]

An example of a correct RCU conversion was done in commit 8af088710d1
(posix-timers: RCU conversion)



--
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/