projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2f0e8c
)
[S390] kprobes: add parameter check to module_free()
author
Hendrik Brueckner
<
[email protected]
>
Tue, 8 Jun 2010 16:58:10 +0000
(18:58 +0200)
committer
Martin Schwidefsky
<
[email protected]
>
Tue, 8 Jun 2010 16:58:23 +0000
(18:58 +0200)
When unregistering kprobes, kprobes calls module_free() and
always passes NULL for the mod parameter. Add a check to
prevent NULL pointer dereferences.
See commit
740a8de0796dd12890b3c8ddcfabfcb528b78d40
for more details.
Signed-off-by: Hendrik Brueckner <
[email protected]
>
Signed-off-by: Martin Schwidefsky <
[email protected]
>
arch/s390/kernel/module.c
patch
|
blob
|
history
diff --git
a/arch/s390/kernel/module.c
b/arch/s390/kernel/module.c
index 639380a0c45c6278db26a03ea7b39eeec8fc48f2..22cfd634c35531b7f8a1d4057f92b4af72e20d1a 100644
(file)
--- a/
arch/s390/kernel/module.c
+++ b/
arch/s390/kernel/module.c
@@
-55,8
+55,10
@@
void *module_alloc(unsigned long size)
/* Free memory returned from module_alloc */
void module_free(struct module *mod, void *module_region)
{
- vfree(mod->arch.syminfo);
- mod->arch.syminfo = NULL;
+ if (mod) {
+ vfree(mod->arch.syminfo);
+ mod->arch.syminfo = NULL;
+ }
vfree(module_region);
}