login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
17
Re: [PATCH] modpost: detect unterminated device id lists
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrew Morton
Subject:
Re: [PATCH] modpost: detect unterminated device id lists
Date: Monday, September 17, 2007 - 2:50 pm
On Tue, 18 Sep 2007 03:15:14 +0530 (IST) Satyam Sharma <satyam@infradead.org> wrote:
quoted text
> > > 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? -
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
, (Tue Sep 11, 11:41 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Jeff Garzik
, (Wed Sep 12, 4:10 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Alexey Dobriyan
, (Wed Sep 12, 4:48 am)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Greg KH
, (Wed Sep 12, 2:53 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Andrew Morton
, (Wed Sep 12, 4:08 pm)
[PATCH] modpost: detect unterminated device id lists
, Kees Cook
, (Wed Sep 12, 5:49 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Wed Sep 12, 6:21 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Alexey Dobriyan
, (Wed Sep 12, 11:34 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Jeff Garzik
, (Wed Sep 12, 11:42 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Sam Ravnborg
, (Wed Sep 12, 11:58 pm)
Re: [PATCH] pci: fix unterminated pci_device_id lists
, Jan Engelhardt
, (Sat Sep 15, 2:01 am)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Sun Sep 16, 3:14 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Satyam Sharma
, (Sun Sep 16, 5:24 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Satyam Sharma
, (Sun Sep 16, 6:22 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Kees Cook
, (Sun Sep 16, 8:45 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Sun Sep 16, 11:46 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Sun Sep 16, 11:48 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Satyam Sharma
, (Mon Sep 17, 2:45 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Andrew Morton
, (Mon Sep 17, 2:50 pm)
Re: [PATCH] modpost: detect unterminated device id lists
, Mauro Carvalho Chehab
, (Mon Sep 17, 4:36 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso
Re: Cannot change MTU of carp interface?
Richard Daemon
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate