public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] module: fix panic in is_imv_cond_end_module()
Date: Mon, 12 May 2008 09:17:49 -0400	[thread overview]
Message-ID: <1210598269.7921.5.camel@dv> (raw)

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
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

             reply	other threads:[~2008-05-12 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 13:17 Pavel Roskin [this message]
2008-05-12 13:24 ` [PATCH] module: fix panic in is_imv_cond_end_module() Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210598269.7921.5.camel@dv \
    --to=proski@gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox