mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> [ There are more issues here, but the fixes are incredibly ugly - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
5fb24b8109
commit
98562ad8cb
1 file changed
+1
-1
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user