[linux-dvb] [PATCH] dvb-core: Fix several locking related problems.

Johannes Stezenbach js at linuxtv.org
Mon Mar 5 12:19:36 CET 2007

On Mon, Mar 05, 2007 at 01:58:14AM +0100, Oliver Endriss wrote:
> Simon Arlott wrote:
> > Is any part of the patch going to be applied? I mentioned this
> > problem in September last year and it looks like it's existed for
> > years (the semaphore locking did the same thing).  
> Well, I hoped that someone more familiar with the demuxer stuff would
> comment on the patch. I am not very happy about using non-interruptible
> lock operations...
> Anyway, I'll apply the patch to HG master if you submit an updated patch:
> - Please add a line of comment to each mutex_lock() stating _why_ the
>   non-interruptible lock has to be used at this place.

IMHO using mutex_lock_interruptible() is almost always wrong.

The only use it has in dvb-core is to recover from locking bugs --
if it deadlocks you can Ctrl-C out of it
(instead of being left with a non-killable program -> reboot).

But with mutex_lock_interruptible() it's easy to introduce
signal handling bugs, which Simon confirmed to exist.
Fixing those up without reverting to mutex_lock() way might
be possible, but is more difficult.


More information about the linux-dvb mailing list