drivers/media/dvb/dvb-core/dmxdev.c: dvb_dvr_release

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

 



If I have a process open /dev/dvb/adapter0/dvr0 RDONLY and then kill it (^C),
the release function sometimes fails because the lock is still held:

       if (mutex_lock_interruptible(&dmxdev->mutex))
               return -ERESTARTSYS;

This means that the dvbdev->readers semaphore is never updated and any future
attempts to open dvr0 will fail:

[ 1103.961000] function : dvb_dvr_open
[ 1106.540000] function : dvb_dvr_release
[ 1106.540000] dvb_dvr_release : readers++

[ 1111.718000] function : dvb_dvr_open
[ 1115.800000] function : dvb_dvr_release

[ 1118.931000] function : dvb_dvr_open
[ 1118.931000] dvb_dvr_open : BUSY (dvbdev->readers=0)

Everything works fine if I replace the mutex_lock_interruptible check with:

       mutex_lock(&dmxdev->mutex);

[ 1339.409000] function : dvb_dvr_open
[ 1343.711000] function : dvb_dvr_release
[ 1343.727000] dvb_dvr_release : readers++

[ 1344.441000] function : dvb_dvr_open
[ 1350.618000] function : dvb_dvr_release
[ 1350.618000] dvb_dvr_release : readers++

[ 1351.302000] function : dvb_dvr_open
[ 1356.017000] function : dvb_dvr_release
[ 1356.034000] dvb_dvr_release : readers++

[ 1356.781000] function : dvb_dvr_open
[ 1360.145000] function : dvb_dvr_release
[ 1360.164000] dvb_dvr_release : readers++

[ 1360.837000] function : dvb_dvr_open
[ 1363.773000] function : dvb_dvr_release
[ 1363.773000] dvb_dvr_release : readers++

[ 1498.123000] function : dvb_dvr_open
[ 1501.139000] function : dvb_dvr_release
[ 1501.156000] dvb_dvr_release : readers++

[ 1501.856000] function : dvb_dvr_open
[ 1503.410000] function : dvb_dvr_release
[ 1503.427000] dvb_dvr_release : readers++

[ 1503.923000] function : dvb_dvr_open
[ 1511.609000] function : dvb_dvr_release
[ 1511.627000] dvb_dvr_release : readers++

-- 
Simon Arlott

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux