[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tkrat.39b6a8e0dced1929@s5r6.in-berlin.de>
Date: Thu, 1 May 2008 10:43:04 +0200 (CEST)
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Miles Lane <miles.lane@...il.com>
cc: linux-kernel@...r.kernel.org, Kristian Hoegsberg <krh@...hat.com>,
linux1394-devel@...ts.sourceforge.net
Subject: Re: 2.6.25-git16 -- BUG: unable to handle kernel NULL pointer
dereference at 00000000 -- IP: [<c02dd5d5>] fw_show_drv_device_ids+0xd9/0xee
On 30 Apr, Miles Lane wrote:
> BUG: unable to handle kernel NULL pointer dereference at 00000000
> IP: [<c02dd5d5>] fw_show_drv_device_ids+0xd9/0xee
[...]
Is everything alright again with this patch?
From: Stefan Richter <stefanr@...6.in-berlin.de>
Subject: ieee1394: fix NULL pointer dereference in sysfs access
Regression since "ieee1394: prevent device binding of raw1394,
video1394, dv1394", commit d2ace29fa44589da51fedc06a67b3f05301f3bfd:
$ cat /sys/bus/ieee1394/drivers/raw1394/device_ids
triggers a NULL pointer dereference in fw_show_drv_device_ids.
Reported-by: Miles Lane <miles.lane@...il.com>
Signed-off-by: Stefan Richter <stefanr@...6.in-berlin.de>
---
drivers/ieee1394/nodemgr.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux/drivers/ieee1394/nodemgr.c
===================================================================
--- linux.orig/drivers/ieee1394/nodemgr.c
+++ linux/drivers/ieee1394/nodemgr.c
@@ -520,8 +520,11 @@ static ssize_t fw_show_drv_device_ids(st
char *scratch = buf;
driver = container_of(drv, struct hpsb_protocol_driver, driver);
+ id = driver->id_table;
+ if (!id)
+ return 0;
- for (id = driver->id_table; id->match_flags != 0; id++) {
+ for (; id->match_flags != 0; id++) {
int need_coma = 0;
if (id->match_flags & IEEE1394_MATCH_VENDOR_ID) {
--
Stefan Richter
-=====-==--- -=-= ----=
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists