login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
6
Re: [ 88.628451] BUG: unable to handle kernel paging request at f8dbf000 "isight_firmware"
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Matthew Garrett <mjg59@...>
Cc: Justin Mattock <justinmattock@...>, Linux Kernel Mailing List <linux-kernel@...>, <linux-usb@...>
Subject:
Re: [ 88.628451] BUG: unable to handle kernel paging request at f8dbf000 "isight_firmware"
Date: Friday, June 6, 2008 - 2:07 pm
On Fri, 6 Jun 2008 13:11:36 +0100 Matthew Garrett <mjg59@srcf.ucam.org> wrote:
quoted text
> Argh. My firmware image contained the 0x8001 token that indicates end of > firmware - the ones generated by Etienne's tool don't, so the driver > reads straight off the end of the buffer. Can you try this patch? It > also incorporates the cleanups Andrew suggested, and should be resistant > to malformed data. > > diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c > index 390e048..cc5943c 100644 > --- a/drivers/usb/misc/isight_firmware.c > +++ b/drivers/usb/misc/isight_firmware.c > @@ -39,9 +39,9 @@ static int isight_firmware_load(struct usb_interface *intf, > struct usb_device *dev = interface_to_usbdev(intf); > int llen, len, req, ret = 0; > const struct firmware *firmware; > - unsigned char *buf; > + unsigned char *buf = kmalloc(50, GFP_KERNEL); > unsigned char data[4]; > - char *ptr; > + u8 *ptr;
if (!buf) return -ENOMEM; please.
quoted text
> if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { > printk(KERN_ERR "Unable to load isight firmware\n"); > @@ -59,7 +59,7 @@ static int isight_firmware_load(struct usb_interface *intf, > goto out; > } > > - while (1) { > + while (ptr+4 <= firmware->data+firmware->size) { > memcpy(data, ptr, 4); > len = (data[0] << 8 | data[1]); > req = (data[2] << 8 | data[3]);
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[ 88.628451] BUG: unable to handle kernel paging request at ...
, Justin Mattock
, (Wed Jun 4, 3:13 pm)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Andrew Morton
, (Fri Jun 6, 3:26 am)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Justin Mattock
, (Fri Jun 6, 4:37 am)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Matthew Garrett
, (Fri Jun 6, 8:11 am)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Andrew Morton
, (Fri Jun 6, 2:07 pm)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Justin Mattock
, (Fri Jun 6, 2:10 pm)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Justin Mattock
, (Fri Jun 6, 2:38 pm)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Greg KH
, (Fri Jun 6, 2:55 pm)
[PATCH] isight_firmware: Avoid crash on loading invalid firm...
, Matthew Garrett
, (Fri Jun 6, 3:21 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Andrew Morton
, (Fri Jun 6, 3:35 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Matthew Garrett
, (Fri Jun 6, 3:48 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Johannes Weiner
, (Fri Jun 6, 9:05 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Justin Mattock
, (Fri Jun 6, 10:38 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Justin Mattock
, (Fri Jun 6, 5:14 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Matthew Garrett
, (Fri Jun 6, 5:50 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invalid ...
, Justin Mattock
, (Fri Jun 6, 6:20 pm)
Re: [ 88.628451] BUG: unable to handle kernel paging request...
, Justin Mattock
, (Fri Jun 6, 10:24 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
James Bottomley
Re: Integration of SCST in the mainstream Linux kernel
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
majkls
sys_chroot+sys_fchdir Fix
Paul Mackerras
Re: [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
KOSAKI Motohiro
[bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
git-commits-head
:
Colocation donated by:
Who's online
There are currently
3 users
and
944 guests
online.
Online users
tgrey
strcmp
roundtheruggedd
Syndicate