Re: budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <o.endriss@xxxxxx> 

Btw, this fix should be applied to all kernels >= 2.6.26.

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
----------------------------------------------------------------
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 */

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux