From patchwork Sun Jan 18 13:36:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Endriss X-Patchwork-Id: 3006 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0IDXwJ2006248 for ; Sun, 18 Jan 2009 05:33:59 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756830AbZARNiV (ORCPT ); Sun, 18 Jan 2009 08:38:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758214AbZARNiV (ORCPT ); Sun, 18 Jan 2009 08:38:21 -0500 Received: from mail.gmx.net ([213.165.64.20]:57810 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756830AbZARNiU (ORCPT ); Sun, 18 Jan 2009 08:38:20 -0500 Received: (qmail invoked by alias); 18 Jan 2009 13:38:17 -0000 Received: from p5B30D4C5.dip.t-dialin.net (HELO charon.escape-edv.de) [91.48.212.197] by mail.gmx.net (mp066) with SMTP; 18 Jan 2009 14:38:17 +0100 X-Authenticated: #476490 X-Provags-ID: V01U2FsdGVkX19um/I1/EFuf4t7iLws7JXkyTYpRHnrx8cmHeWy0z Ot1gtE6NpreMF2 Received: from orion.escape-edv.de (192.168.1.10) by charon.escape-edv.de (192.168.1.9) with esmtp ; Sun, 18 Jan 2009 14:36:06 +0100 From: Oliver Endriss Organization: ESCAPE GmbH EDV-Loesungen To: Tony Broad Subject: Re: budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff" Date: Sun, 18 Jan 2009 14:36:52 +0100 User-Agent: KMail/1.9.6 Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab References: <49730AAA.4030209@byteworkshop.co.uk> In-Reply-To: <49730AAA.4030209@byteworkshop.co.uk> MIME-Version: 1.0 Message-Id: <200901181436.53820@orion.escape-edv.de> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Tony Broad wrote: > I'm using a "Hauppauge WinTV-NOVA-T DVB card" of PCI id "13c2:1005" with > kernel 2.6.27.9. > > I've recently experienced the following fairly consistent kernel oops on > startup in grundig_29504_401_tuner_set_params from budget.c. As you > might expect, following this failure, the card doesn't work. > > I'm not a kernel developer, nevertheless I seem to have managed to track > this down to a non-existent initialisation of > budget->dvb_frontend->tuner_priv. > > The attached patch fixes the problem for me (and I've managed to tune > the card successfully as a result), but I don't know of anyone else > using the driver so I can't test it on other people. > > Please let me know if this works for you or if I've done something > terribly wrong ;-( Hi, you are right, and your patch is basically correct. Anyway, the l64781 frontend driver is a better place to fix the bug: Initializing the frontend struct at allocation time will prevent this kind of problem for all card drivers now and forever... Signed-off-by: Oliver Endriss Btw, this fix should be applied to all kernels >= 2.6.26. CU Oliver diff -r 1930f80b6970 linux/drivers/media/dvb/frontends/l64781.c --- a/linux/drivers/media/dvb/frontends/l64781.c Sun Dec 14 15:38:29 2008 +0100 +++ b/linux/drivers/media/dvb/frontends/l64781.c Sun Jan 18 14:04:39 2009 +0100 @@ -501,7 +501,7 @@ struct dvb_frontend* l64781_attach(const { .addr = config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } }; /* allocate memory for the internal state */ - state = kmalloc(sizeof(struct l64781_state), GFP_KERNEL); + state = kzalloc(sizeof(struct l64781_state), GFP_KERNEL); if (state == NULL) goto error; /* setup the state */