[PATCH] module: fix panic in is_imv_cond_end_module()

From: Pavel Roskin
Date: Mon May 12 2008 - 09:18:00 EST


Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---
The patch is for mingo/linux-2.6-ftrace.git repository.

kernel/module.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/kernel/module.c b/kernel/module.c
index 8f2f6fd..1831868 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2664,6 +2664,10 @@ EXPORT_SYMBOL_GPL(module_imv_update);
int is_imv_cond_end_module(unsigned long addr1, unsigned long addr2)
{
struct module *mod = __module_text_address(addr1);
+
+ if (!mod)
+ return 0;
+
return _is_imv_cond_end(mod->immediate_cond_end,
mod->immediate_cond_end + mod->num_immediate_cond_end,
addr1, addr2);

--
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/