Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753879AbXIPWPY (ORCPT ); Sun, 16 Sep 2007 18:15:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753139AbXIPWPM (ORCPT ); Sun, 16 Sep 2007 18:15:12 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:60316 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753074AbXIPWPK (ORCPT ); Sun, 16 Sep 2007 18:15:10 -0400 Date: Sun, 16 Sep 2007 15:14:47 -0700 From: Andrew Morton To: Kees Cook Cc: Greg KH , Alexey Dobriyan , Jeff Garzik , linux-kernel@vger.kernel.org, Ben Collins , Michael Wu Subject: Re: [PATCH] modpost: detect unterminated device id lists Message-Id: <20070916151447.dc925a9e.akpm@linux-foundation.org> In-Reply-To: <20070913004937.GM8183@outflux.net> References: <20070912064134.GO7910@outflux.net> <46E7C91D.3070001@garzik.org> <20070912215356.GC23294@kroah.com> <20070913004937.GM8183@outflux.net> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1018 Lines: 29 On Wed, 12 Sep 2007 17:49:37 -0700 Kees Cook wrote: > This patch against 2.6.23-rc6 will cause modpost to fail if any device > id lists are incorrectly terminated, after reporting the offender. 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" ??) 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. - 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/