mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wim Van Sebroeck <wim@iguana.be>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, Jiri Slaby <jslaby@suse.cz>
Subject: [GIT PULL REQUEST] watchdog - v2.6.38-rc8
Date: Wed, 9 Mar 2011 22:39:09 +0100	[thread overview]
Message-ID: <20110309213909.GA19608@infomag.iguana.be> (raw)

Hi Linus,

Please pull from 'master' branch of
	git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
	master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git

This will update the following files:

 drivers/watchdog/sbc_fitpc2_wdt.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

with these Changes:

Author: Jiri Slaby <jslaby@suse.cz>
Date:   Mon Feb 28 10:16:29 2011 +0100

    watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME
    
    Some systems don't provide DMI_BOARD_NAME in their DMI tables. Avoid
    crash in such situations in fitpc2_wdt_init.
    
    The fix is to check if the dmi_get_system_info return value is NULL.
    
    The oops:
    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [<ffffffff81253ae6>] strstr+0x26/0xa0
    PGD 3966e067 PUD 39605067 PMD 0
    Oops: 0000 [#1] SMP
    last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
    CPU 1
    Modules linked in: ...
    Pid: 1748, comm: modprobe Not tainted 2.6.37-22-default #1 /Bochs
    RIP: 0010:[<ffffffff81253ae6>]  [<ffffffff81253ae6>] strstr+0x26/0xa0
    RSP: 0018:ffff88003ad73f18  EFLAGS: 00010206
    RAX: 0000000000000000 RBX: 00000000ffffffed RCX: 00000000ffffffff
    RDX: ffffffffa003f4cc RSI: ffffffffa003f4c2 RDI: 0000000000000000
    ...
    CR2: 0000000000000000 CR3: 000000003b7ac000 CR4: 00000000000006e0
    ...
    Process modprobe (pid: 1748, threadinfo ffff88003ad72000, task ffff88002e6365c0)
    Stack: ...
    Call Trace:
     [<ffffffffa004201f>] fitpc2_wdt_init+0x1f/0x13c [sbc_fitpc2_wdt]
     [<ffffffff810002da>] do_one_initcall+0x3a/0x170
    ...
    Code: f3 c3 0f 1f 00 80 3e 00 53 48 89 f8 74 1b 48 89 f2 0f 1f 40 00 48 83 c2 01 80 3a 00 75 f7 49 89 d0 48 89 f8 49 29 f0 75 02 5b c3 <80> 3f 00 74 0e 0f 1f 44 00 00 48 83 c0 01 80 38 00 75 f7 49 89
    
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

The Changes can also be looked at on:
	http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index c7d67e9..7990625 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -201,11 +201,14 @@ static struct miscdevice fitpc2_wdt_miscdev = {
 static int __init fitpc2_wdt_init(void)
 {
 	int err;
+	const char *brd_name;
 
-	if (!strstr(dmi_get_system_info(DMI_BOARD_NAME), "SBC-FITPC2"))
+	brd_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+	if (!brd_name || !strstr(brd_name, "SBC-FITPC2"))
 		return -ENODEV;
 
-	pr_info("%s found\n", dmi_get_system_info(DMI_BOARD_NAME));
+	pr_info("%s found\n", brd_name);
 
 	if (!request_region(COMMAND_PORT, 1, WATCHDOG_NAME)) {
 		pr_err("I/O address 0x%04x already in use\n", COMMAND_PORT);

             reply	other threads:[~2011-03-09 21:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 21:39 Wim Van Sebroeck [this message]
2011-03-14 10:53 Wim Van Sebroeck

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=20110309213909.GA19608@infomag.iguana.be \
    --to=wim@iguana.be \
    --cc=akpm@linux-foundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®