diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-06 00:11:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-06 00:11:42 -0400 |
commit | ed011b22ce567eabefa9ea571d3721c10ecd0553 (patch) | |
tree | c7aee6684613075c772388a99a9137014549434e /kernel/module.c | |
parent | 85bac32c4a52c592b857f2c360cc5ec93a097d70 (diff) | |
parent | e07cccf4046978df10f2e13fe2b99b2f9b3a65db (diff) |
Merge commit 'v2.6.31-rc9' into tracing/core
Merge reason: move from -rc5 to -rc9.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index b1821438694e..46580edff0cb 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -914,16 +914,18 @@ void __symbol_put(const char *symbol) | |||
914 | } | 914 | } |
915 | EXPORT_SYMBOL(__symbol_put); | 915 | EXPORT_SYMBOL(__symbol_put); |
916 | 916 | ||
917 | /* Note this assumes addr is a function, which it currently always is. */ | ||
917 | void symbol_put_addr(void *addr) | 918 | void symbol_put_addr(void *addr) |
918 | { | 919 | { |
919 | struct module *modaddr; | 920 | struct module *modaddr; |
921 | unsigned long a = (unsigned long)dereference_function_descriptor(addr); | ||
920 | 922 | ||
921 | if (core_kernel_text((unsigned long)addr)) | 923 | if (core_kernel_text(a)) |
922 | return; | 924 | return; |
923 | 925 | ||
924 | /* module_text_address is safe here: we're supposed to have reference | 926 | /* module_text_address is safe here: we're supposed to have reference |
925 | * to module from symbol_get, so it can't go away. */ | 927 | * to module from symbol_get, so it can't go away. */ |
926 | modaddr = __module_text_address((unsigned long)addr); | 928 | modaddr = __module_text_address(a); |
927 | BUG_ON(!modaddr); | 929 | BUG_ON(!modaddr); |
928 | module_put(modaddr); | 930 | module_put(modaddr); |
929 | } | 931 | } |
@@ -1279,6 +1281,10 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect, | |||
1279 | struct module_notes_attrs *notes_attrs; | 1281 | struct module_notes_attrs *notes_attrs; |
1280 | struct bin_attribute *nattr; | 1282 | struct bin_attribute *nattr; |
1281 | 1283 | ||
1284 | /* failed to create section attributes, so can't create notes */ | ||
1285 | if (!mod->sect_attrs) | ||
1286 | return; | ||
1287 | |||
1282 | /* Count notes sections and allocate structures. */ | 1288 | /* Count notes sections and allocate structures. */ |
1283 | notes = 0; | 1289 | notes = 0; |
1284 | for (i = 0; i < nsect; i++) | 1290 | for (i = 0; i < nsect; i++) |