login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
17
Re: [PATCH] modpost: detect unterminated device id lists
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Mauro Carvalho Chehab <mchehab@...>
To: Andrew Morton <akpm@...>
Cc: Satyam Sharma <satyam@...>, Satyam Sharma <satyam.sharma@...>, Kees Cook <kees@...>, Greg KH <greg@...>, Alexey Dobriyan <adobriyan@...>, Jeff Garzik <jeff@...>, <linux-kernel@...>, Ben Collins <bcollins@...>, Michael Wu <flamingice@...>
Subject:
Re: [PATCH] modpost: detect unterminated device id lists
Date: Monday, September 17, 2007 - 7:36 pm
Hi Andrew, Em Seg, 2007-09-17 às 14:50 -0700, Andrew Morton escreveu:
quoted text
> On Tue, 18 Sep 2007 03:15:14 +0530 (IST) > Satyam Sharma <satyam@infradead.org> wrote: > > > > > > > On Sun, 16 Sep 2007, Andrew Morton wrote: > > > > > On Mon, 17 Sep 2007 05:54:45 +0530 "Satyam Sharma" <satyam.sharma@gmail.com> wrote: > > > > > > > On 9/17/07, Andrew Morton <akpm@linux-foundation.org> wrote: > > > > > > > > > > I'm getting this: > > > > > > > > > > rusb2/pvrusb2: struct usb_device_id is 20 bytes. The last of 3 is: > > > > > 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > > > > > 0x00 0x00 0x00 0x00 0x00 > > > > > FATAL: drivers/media/video/pvrusb2/pvrusb2: struct usb_device_id is not terminated > > > > > with a NULL entry! > > > > > > > > > > ("rusb2/pvrusb2" ??) > > > > > > > > Hmm? Are you sure you didn't see any "drivers/media/video/pv" before the > > > > "rusb2/pvrusb2" bit? > > > > > > Fairly. I looked twice. > > > > "drivers/media/video/pvrusb2/pvrusb2" comes out correctly here ... > > > > > > > > Looking at Kees' patch (and the existing code), I've no > > > > clue how/why this should happen ... will try to reproduce here ... > > > > > > > > > > > > > but: > > > > > > > > > > struct usb_device_id pvr2_device_table[] = { > > > > > [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, > > > > > [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, > > > > > { USB_DEVICE(0, 0) }, > > > > > }; > > > > > > > > > > looks OK? > > > > > > > > > > Using plain old "{ }" shut the warning up. > > > > > > > > USB_DEVICE(0, 0) is not empty termination, actually, and this looks like > > > > a genuine bug caught by the patch. As that dump shows, USB_DEVICE(0, 0) > > > > assigns "0x03 0x00" (in little endian) to usb_device_id.match_flags. And > > > > I don't think the USB code treats such an entry as an empty entry (?) > > > > > > > > Interestingly, the "USB_DEVICE(0, 0)" thing is absent from latest -git > > > > tree and also in my copy of 23-rc4-mm1 -- so this looks like something > > > > you must've merged recently. > > > > > > git-dvb very carefully does > > > > > > --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c~git-dvb > > > +++ a/drivers/media/video/pvrusb2/pvrusb2-hdw.c > > > @@ -44,7 +44,7 @@ > > > struct usb_device_id pvr2_device_table[] = { > > > [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, > > > [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, > > > - { } > > > + { USB_DEVICE(0, 0) }, > > > }; > > > > > > MODULE_DEVICE_TABLE(usb, pvr2_device_table); > > > > Ok, this is a false positive indeed, the core USB code does in fact > > treat such an entry as an empty entry (usb_match_id() tests only the > > .idVendor, .bDeviceClass, .bInterfaceClass and .driver_info members > > for non-zero and not the .match_flags member). > > > > However, a quick-grep-and-glance tells us that none of the other 2213 > > occurrences of USB_DEVICE() in the tree ever do this "(0,0)" thing, > > so it does make sense to change this one to a simple "{ }" as well -- > > that's clearer style anyway, and the "standard" way to empty-terminate > > in the rest of the tree, if nothing else. > > > > yeah, I think so. Mauro, could you please drop that change?
Patch dropped from my tree. Cheers, Mauro. -
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:
[PATCH] pci: fix unterminated pci_device_id lists
, Kees Cook
, (Wed Sep 12, 2:41 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Jeff Garzik
, (Wed Sep 12, 7:10 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Alexey Dobriyan
, (Wed Sep 12, 7:48 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Greg KH
, (Wed Sep 12, 5:53 pm)
[PATCH] modpost: detect unterminated device id lists
, Kees Cook
, (Wed Sep 12, 8:49 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Satyam Sharma
, (Sun Sep 16, 9:22 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Kees Cook
, (Sun Sep 16, 11:45 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Mon Sep 17, 2:48 am)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Sun Sep 16, 6:14 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Satyam Sharma
, (Sun Sep 16, 8:24 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Mon Sep 17, 2:46 am)
Re: [PATCH] modpost: detect unterminated device id lists
, Satyam Sharma
, (Mon Sep 17, 5:45 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Mon Sep 17, 5:50 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Mauro Carvalho Chehab
, (Mon Sep 17, 7:36 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Wed Sep 12, 9:21 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Andrew Morton
, (Wed Sep 12, 7:08 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Alexey Dobriyan
, (Thu Sep 13, 2:34 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Sam Ravnborg
, (Thu Sep 13, 2:58 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Jeff Garzik
, (Thu Sep 13, 2:42 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Jan Engelhardt
, (Sat Sep 15, 5:01 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Zach Brown
[PATCH 3 of 4] Teach paths to wake a specific void * target instead of a whole tas...
Paul Jackson
Re: cpuset-remove-sched-domain-hooks-from-cpusets
Jeff Garzik
Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series..
Greg Kroah-Hartman
[PATCH 002/196] Chinese: rephrase English introduction in HOWTO
linux-netdev
:
Eric Dumazet
Re: [PATCH] tcp: splice as many packets as possible at once
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Ingo Molnar
Re: [GIT]: Networking
Alexey Dobriyan
[PATCH 06/53] netns xfrm: per-netns xfrm_state_bysrc hash
git
:
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
978 guests
online.
Online users
Jeremy
maheshdm
Syndicate