Takashi Iwai
e48fee81d3
media: ivtv: Fix Oops when no firmware is loaded
commit deb29e9022 upstream.
When ivtv PCM device is accessed at the state where no firmware is
loaded, it oopses like:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
IP: [<ffffffffa049a881>] try_mailbox.isra.0+0x11/0x50 [ivtv]
Call Trace:
[<ffffffffa049aa20>] ivtv_api_call+0x160/0x6b0 [ivtv]
[<ffffffffa049af86>] ivtv_api+0x16/0x40 [ivtv]
[<ffffffffa049b10c>] ivtv_vapi+0xac/0xc0 [ivtv]
[<ffffffffa049d40d>] ivtv_start_v4l2_encode_stream+0x19d/0x630 [ivtv]
[<ffffffffa0530653>] snd_ivtv_pcm_capture_open+0x173/0x1c0 [ivtv_alsa]
[<ffffffffa04526f1>] snd_pcm_open_substream+0x51/0x100 [snd_pcm]
[<ffffffffa0452853>] snd_pcm_open+0xb3/0x260 [snd_pcm]
[<ffffffffa0452a37>] snd_pcm_capture_open+0x37/0x50 [snd_pcm]
[<ffffffffa033f557>] snd_open+0xa7/0x1e0 [snd]
[<ffffffff8118a628>] chrdev_open+0x88/0x1d0
[<ffffffff811840be>] do_dentry_open+0x1de/0x270
[<ffffffff81193a73>] do_last+0x1c3/0xec0
[<ffffffff81194826>] path_openat+0xb6/0x670
[<ffffffff81195b65>] do_filp_open+0x35/0x80
[<ffffffff81185449>] do_sys_open+0x129/0x210
[<ffffffff815b782d>] system_call_fastpath+0x1a/0x1f
This patch adds the check of firmware at PCM open callback like other
open callbacks of this driver.
Bugzilla: https://apibugzilla.novell.com/show_bug.cgi?id=875440
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-30 20:09:44 -07:00
..
2014-06-07 13:25:39 -07:00
2014-06-16 13:42:54 -07:00
2013-12-08 07:29:25 -08:00
2014-06-07 13:25:31 -07:00
2014-06-07 13:25:37 -07:00
2014-06-07 13:25:33 -07:00
2014-06-07 13:25:37 -07:00
2014-06-30 20:09:41 -07:00
2014-06-07 13:25:35 -07:00
2014-06-07 13:25:29 -07:00
2014-06-26 15:12:37 -04:00
2014-04-14 06:42:19 -07:00
2014-04-14 06:42:15 -07:00
2014-06-07 13:25:39 -07:00
2014-03-06 21:30:14 -08:00
2014-03-06 21:30:13 -08:00
2014-02-13 13:47:59 -08:00
2014-06-30 20:09:41 -07:00
2014-05-30 21:52:11 -07:00
2013-11-29 11:11:53 -08:00
2014-05-13 13:59:45 +02:00
2014-06-11 12:03:24 -07:00
2014-06-30 20:09:42 -07:00
2014-06-26 15:12:40 -04:00
2014-06-11 12:03:22 -07:00
2014-06-07 13:25:39 -07:00
2014-01-09 12:24:21 -08:00
2014-06-26 15:12:41 -04:00
2014-06-16 13:42:53 -07:00
2014-06-07 13:25:36 -07:00
2014-06-07 13:25:40 -07:00
2014-06-07 13:25:28 -07:00
2014-04-14 06:42:18 -07:00
2014-06-07 13:25:34 -07:00
2013-08-11 18:35:20 -07:00
2014-06-11 12:03:24 -07:00
2014-06-30 20:09:44 -07:00
2014-05-06 07:55:28 -07:00
2014-06-16 13:42:54 -07:00
2014-02-13 13:48:00 -08:00
2014-05-13 13:59:45 +02:00
2014-06-30 20:09:41 -07:00
2013-11-13 12:05:35 +09:00
2014-02-22 12:41:27 -08:00
2013-08-11 18:35:21 -07:00
2014-02-06 11:08:15 -08:00
2014-06-07 13:25:38 -07:00
2014-02-20 11:06:11 -08:00
2014-02-06 11:08:16 -08:00
2014-03-23 21:38:22 -07:00
2014-02-22 12:41:29 -08:00
2014-03-23 21:38:09 -07:00
2014-03-31 09:58:13 -07:00
2014-06-26 15:12:37 -04:00
2014-05-13 13:59:42 +02:00
2014-06-26 15:12:37 -04:00
2014-03-23 21:38:16 -07:00
2014-06-30 20:09:41 -07:00
2014-06-26 15:12:37 -04:00
2014-06-07 13:25:30 -07:00
2013-11-13 12:05:33 +09:00
2014-06-30 20:09:44 -07:00
2014-04-03 12:01:05 -07:00
2014-04-14 06:42:18 -07:00
2014-06-30 20:09:42 -07:00
2014-05-13 13:59:41 +02:00
2014-02-22 12:41:28 -08:00
2014-05-06 07:55:28 -07:00
2013-12-20 07:45:11 -08:00
2013-12-11 22:36:27 -08:00