Skip to contentSkip to conversation

module: fix panic in is_imv_cond_end_module()

PATCH In review Pavel Roskin 1 participant 2 messages May 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module: fix panic in is_imv_cond_end_module()

---
The patch is for mingo/linux-2.6-ftrace.git repository.

 kernel/module.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
kernel/module.c +4 -0
index 8f2f6fd..1831868 100644
@@ -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);
Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw
Quoted 3 lines · Pavel Roskin

---
The patch is for mingo/linux-2.6-ftrace.git repository.

I see it's in linux-2.6-sched-devel already. Sorry for the noise.

Signature · 2 lines
Regards,
Pavel Roskin