projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] ensure NULL deref can't possibly happen in is_exported()
[cascardo/linux.git]
/
kernel
/
module.c
diff --git
a/kernel/module.c
b/kernel/module.c
index
bbe0486
..
d75275d
100644
(file)
--- a/
kernel/module.c
+++ b/
kernel/module.c
@@
-1326,7
+1326,7
@@
int is_exported(const char *name, const struct module *mod)
if (!mod && lookup_symbol(name, __start___ksymtab, __stop___ksymtab))
return 1;
else
- if (lookup_symbol(name, mod->syms, mod->syms + mod->num_syms))
+ if (
mod &&
lookup_symbol(name, mod->syms, mod->syms + mod->num_syms))
return 1;
else
return 0;