]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vp7045: fix buffer setup
authorFlorian Mickler <florian@mickler.org>
Wed, 10 Aug 2011 10:05:20 +0000 (07:05 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:16 +0000 (11:40 -0700)
commitf2685ef0fbc5fff0a8f1cdc204bf37ab0c9a04a7
treec72bd449b9fba10dfdfa264a52a5814d63252e0c
parentac0a6fa16b992606e52d45191fcad3d7ea5b7f11
vp7045: fix buffer setup

commit fc61ccd35fd59d5362d37c8bf9c0526c85086c84 upstream.

dvb_usb_device_init calls the frontend_attach method of this driver which
uses vp7045_usb_ob. In order to have a buffer ready in vp7045_usb_op, it has to
be allocated before that happens.

Luckily we can use the whole private data as the buffer as it gets separately
allocated on the heap via kzalloc in dvb_usb_device_init and is thus apt for
use via usb_control_msg.

This fixes a
BUG: unable to handle kernel paging request at 0000000000001e78

reported by Tino Keitel and diagnosed by Dan Carpenter.

Tested-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/dvb/dvb-usb/vp7045.c