summaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@vmware.com>2011-02-04 13:30:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-21 15:21:53 -0800
commit98562ad8cb03fa6b7ba7f50168cdb34a98abcc1d (patch)
tree2ab860a56a6d7adb2df6aea4202f24d7bd301dff /include/linux/module.h
parent5fb24b8109e0cb343cc89cb148a836d490caa456 (diff)
downloadlinux-stable-98562ad8cb03fa6b7ba7f50168cdb34a98abcc1d.tar.gz
linux-stable-98562ad8cb03fa6b7ba7f50168cdb34a98abcc1d.tar.bz2
linux-stable-98562ad8cb03fa6b7ba7f50168cdb34a98abcc1d.zip
module: explicitly align module_version_attribute structure
We force particular alignment when we generate attribute structures when generation MODULE_VERSION() data and we need to make sure that this alignment is followed when we iterate over these structures, otherwise we may crash on platforms whose natural alignment is not sizeof(void *), such as m68k. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dtor@vmware.com> [ There are more issues here, but the fixes are incredibly ugly - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 9bdf27c7615b..5de42043dff0 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -62,7 +62,7 @@ struct module_version_attribute {
struct module_attribute mattr;
const char *module_name;
const char *version;
-};
+} __attribute__ ((__aligned__(sizeof(void *))));
struct module_kobject
{