make bzImage fails for mm-sources-2.6.6-r2 when CONFIG_MODULE_UNLOAD is not set. Changing the .config from # CONFIG_MODULE_UNLOAD is not set to CONFIG_MODULE_UNLOAD=y fixes the problem. Reproducible: Always Steps to Reproduce: 1. don't configure support for unloading kernel modules (CONFIG_MODULE_UNLOAD) 2. make bzImage Actual Results: ... CC kernel/dma.o CC kernel/uid16.o CC kernel/module.o kernel/module.c:730: error: redefinition of `add_attribute' kernel/module.c:382: error: `add_attribute' previously defined here kernel/module.c:382: warning: `add_attribute' defined but not used make[2]: *** [kernel/module.o] Error 1 make[1]: *** [kernel] Error 2 make: *** [bzImage] Error 2 Expected Results: Successful completion of `make bzImage` I'm not a dev, so I am not sure, but this looks like an upstream bug. Taking a quick glance at kernel/module.c shows that if CONFIG_MODULE_UNLOAD is not defined, then add_attribute() gets defined again (on line 730), albeit an empty function.
This is true and smething that has been fixed upstream with the latest mm. 2.6.6-mm3 should have this fixed.