Re: 2.6.39-rc6-mmotm0506 and -next - __kfree_rcu breaks third-party kernel code

From: Valdis . Kletnieks
Date: Mon May 09 2011 - 13:02:59 EST


On Mon, 09 May 2011 12:56:32 EDT, Valdis.Kletnieks@xxxxxx said:

> OK, *now* I'm confused. The magic sauce appears to be "-Os". Adding that makes
> the compile work. And for no obvious reason - there's something in there that
> causes indigestion, but only if the optimizer isn't invoked.

/lib/modules/2.6.39-rc6-mmotm0506//build/include/linux/rcupdate.h: In function '__kfree_rcu':
/lib/modules/2.6.39-rc6-mmotm0506//build/include/linux/rcupdate.h:822:2: error: size of unnamed array is negative

Apparently, it's in fact bad code - but the entire __kfree_rcu() function is
being reaped by the optimizer as dead code before the code generator
sees the size issue with the array. Without optimization, the code hangs
around long enough for the problem to crop up.

Attachment: pgp00000.pgp
Description: PGP signature