login
Login
/
Register
Search
Search this site:
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
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Justin Mattock
Subject:
Re: [ 88.628451] BUG: unable to handle kernel paging request at f8dbf000 "isight_firmware"
Date: Friday, June 6, 2008 - 11:10 am
On Fri, Jun 6, 2008 at 6:07 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
quoted text
> On Fri, 6 Jun 2008 13:11:36 +0100 Matthew Garrett <mjg59@srcf.ucam.org> wrote: > >> 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. > >> 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]); > >
O.K. Thanks for the help and patch, I'll go ahead and add that in and let you know. regards; -- Justin P. Mattock --
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 a ...
, Justin Mattock
, (Wed Jun 4, 12:13 pm)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Andrew Morton
, (Fri Jun 6, 12:26 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Justin Mattock
, (Fri Jun 6, 1:37 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Matthew Garrett
, (Fri Jun 6, 5:11 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Justin Mattock
, (Fri Jun 6, 7:24 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Andrew Morton
, (Fri Jun 6, 11:07 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Justin Mattock
, (Fri Jun 6, 11:10 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Justin Mattock
, (Fri Jun 6, 11:38 am)
Re: [ 88.628451] BUG: unable to handle kernel paging reque ...
, Greg KH
, (Fri Jun 6, 11:55 am)
[PATCH] isight_firmware: Avoid crash on loading invalid fi ...
, Matthew Garrett
, (Fri Jun 6, 12:21 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Andrew Morton
, (Fri Jun 6, 12:35 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Matthew Garrett
, (Fri Jun 6, 12:48 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Justin Mattock
, (Fri Jun 6, 2:14 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Matthew Garrett
, (Fri Jun 6, 2:50 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Justin Mattock
, (Fri Jun 6, 3:20 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Johannes Weiner
, (Fri Jun 6, 6:05 pm)
Re: [PATCH] isight_firmware: Avoid crash on loading invali ...
, Justin Mattock
, (Fri Jun 6, 7:38 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Greg Kroah-Hartman
[PATCH 16/36] driver core: cpu: fix section mismatch in cpu.c:store_online
Greg Kroah-Hartman
[PATCH 22/36] PM: Make wakeup flags available whenever CONFIG_PM is set
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
Johannes Schindelin
Re: Git checkout preserve timestamp?
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Claudio Jeker
Re: Vlan Tag on Vlan Tag (l2tunneling)
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Tomas Bodzar
bsd: uvm_mapent_alloc: out of static map entries
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Linux Kernel Mailing List
swsusp: provide users with a hint about the no_console_suspend option
Colocation donated by:
Syndicate