From: Jonathan Nieder <jrnieder@gmail.com>
To: Huber Andreas <hobrom@corax.at>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [linux-dvb] cx88-blackbird broken (since 2.6.37)
Date: Sun, 27 Mar 2011 10:28:40 -0500 [thread overview]
Message-ID: <20110327152810.GA32106@elie> (raw)
In-Reply-To: <20110327150610.4029.95961.reportbug@xen.corax.at>
Hi Andi,
Huber Andreas wrote[1]:
> [Symptom]
> Processes that try to open a cx88-blackbird driven MPEG device will hang up.
Thanks for reporting. Just cc-ing some relevant people. Could you file a
bug to track this at <http://bugzilla.kernel.org/>, product v4l-dvb,
component cx88, and then send the bug number to 619827@bugs.debian.org ?
Report follows.
Jonathan
[1] http://bugs.debian.org/619827
> [Cause]
> Nestet mutex_locks (which are not allowed) result in a deadlock.
>
> [Details]
> Source-File: drivers/media/video/cx88/cx88-blackbird.c
> Function: int mpeg_open(struct file *file)
> Problem: the calls to drv->request_acquire(drv); and
> drv->request_release(drv); will hang because they try to lock a
> mutex that has already been locked by a previouse call to
> mutex_lock(&dev->core->lock) ...
>
> 1050 static int mpeg_open(struct file *file)
> 1051 {
> [...]
> 1060 mutex_lock(&dev->core->lock); // MUTEX LOCKED !!!!!!!!!!!!!!!!
> 1061
> 1062 /* Make sure we can acquire the hardware */
> 1063 drv = cx8802_get_driver(dev, CX88_MPEG_BLACKBIRD);
> 1064 if (drv) {
> 1065 err = drv->request_acquire(drv); // HANGS !!!!!!!!!!!!!!!!!!!
> 1066 if(err != 0) {
> 1067 dprintk(1,"%s: Unable to acquire hardware, %d\n", __func__, err);
> 1068 mutex_unlock(&dev->core->lock);;
> 1069 return err;
> 1070 }
> 1071 }
> [...]
>
> Here's the relevant kernel log extract (Linux version 2.6.38-1-amd64 (Debian 2.6.38-1)) ...
>
> Mar 24 21:25:10 xen kernel: [ 241.472067] INFO: task v4l_id:1000 blocked for more than 120 seconds.
> Mar 24 21:25:10 xen kernel: [ 241.478845] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> Mar 24 21:25:10 xen kernel: [ 241.482412] v4l_id D ffff88006bcb6540 0 1000 1 0x00000000
> Mar 24 21:25:10 xen kernel: [ 241.486031] ffff88006bcb6540 0000000000000086 ffff880000000001 ffff88006981c380
> Mar 24 21:25:10 xen kernel: [ 241.489694] 0000000000013700 ffff88006be5bfd8 ffff88006be5bfd8 0000000000013700
> Mar 24 21:25:10 xen kernel: [ 241.493301] ffff88006bcb6540 ffff88006be5a010 ffff88006bcb6540 000000016be5a000
> Mar 24 21:25:10 xen kernel: [ 241.496766] Call Trace:
> Mar 24 21:25:10 xen kernel: [ 241.500145] [<ffffffff81321c4a>] ? __mutex_lock_common+0x127/0x193
> Mar 24 21:25:10 xen kernel: [ 241.503630] [<ffffffff81321d82>] ? mutex_lock+0x1a/0x33
> Mar 24 21:25:10 xen kernel: [ 241.507145] [<ffffffffa09dd155>] ? cx8802_request_acquire+0x66/0xc6 [cx8802]
> Mar 24 21:25:10 xen kernel: [ 241.510699] [<ffffffffa0aab7f2>] ? mpeg_open+0x7a/0x1fc [cx88_blackbird]
> Mar 24 21:25:10 xen kernel: [ 241.514279] [<ffffffff8123bfb6>] ? kobj_lookup+0x139/0x173
> Mar 24 21:25:10 xen kernel: [ 241.517856] [<ffffffffa062d5fd>] ? v4l2_open+0xb3/0xdf [videodev]
next parent reply other threads:[~2011-03-27 15:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110327150610.4029.95961.reportbug@xen.corax.at>
2011-03-27 15:28 ` Jonathan Nieder [this message]
2011-04-02 9:38 ` [RFC/PATCH 0/3] locking fixes for cx88 Jonathan Nieder
2011-04-02 9:41 ` [PATCH 1/3] [media] cx88: protect per-device driver list with device lock Jonathan Nieder
2011-04-02 9:41 ` [PATCH 2/3] [media] cx88: fix locking of sub-driver operations Jonathan Nieder
2011-04-02 9:44 ` [PATCH 3/3] [media] cx88: use a mutex to protect cx8802_devlist Jonathan Nieder
[not found] ` <4D971B8D.4040305@corax.at>
2011-04-02 19:29 ` Jonathan Nieder
2011-04-02 20:13 ` Andreas Huber
2011-04-04 2:12 ` Andreas Huber
2011-04-05 1:16 ` Jonathan Nieder
2011-04-02 14:05 ` [RFC/PATCH 0/3] locking fixes for cx88 Andreas Huber
2011-04-02 15:19 ` Ben Hutchings
2011-04-02 18:30 ` Jonathan Nieder
2011-04-05 3:20 ` [RFC/PATCH v2 0/7] " Jonathan Nieder
2011-04-05 3:22 ` [PATCH 1/7] [media] cx88: protect per-device driver list with device lock Jonathan Nieder
2011-04-05 3:25 ` [PATCH 2/7] [media] cx88: fix locking of sub-driver operations Jonathan Nieder
2011-04-05 3:27 ` [PATCH 3/7] [media] cx88: hold device lock during sub-driver initialization Jonathan Nieder
2011-04-05 3:27 ` [PATCH 4/7] [media] cx88: use a mutex to protect cx8802_devlist Jonathan Nieder
2011-04-05 3:29 ` [PATCH 5/7] [media] cx88: gracefully reject attempts to use unregistered cx88-blackbird driver Jonathan Nieder
2011-04-05 3:30 ` [PATCH 6/7] [media] cx88: don't use atomic_t for core->mpeg_users Jonathan Nieder
2011-04-05 3:31 ` [PATCH 7/7] [mpeg] cx88: don't use atomic_t for core->users Jonathan Nieder
2011-04-05 3:41 ` Jonathan Nieder
2011-04-05 18:17 ` [RFC/PATCH v2 0/7] locking fixes for cx88 Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110327152810.GA32106@elie \
--to=jrnieder@gmail.com \
--cc=hobrom@corax.at \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.