Hi again, Jonathan Nieder wrote: > Huber Andreas wrote[1]: >> Processes that try to open a cx88-blackbird driven MPEG device will hang up. > > Here's a possible fix based on a patch by Ben Hutchings and > corrections from Andi Huber. Warning: probably full of mistakes (my > fault) since I'm not familiar with any of this stuff. Untested. > Review and testing would be welcome. A reroll. As before, the goals are: (1) eliminate deadlock, (2) eliminate races, (3) introduce some clarity. The same caveats as last time apply --- this is only compile-tested. Thanks again to Andi for testing the previous series and for other useful feedback. Patch 1 is meant to protect dev->drvlist against data races. Since v1, I removed some clutter in the patch itself and clarified the change description to match. Patch 2 addresses the original deadlock. The only changes are the description and declared authorship of the patch (at Ben's request). Patch 3 is new. It fixes the reference count breakage Andi noticed (another race previously protected against by the BKL). Patch 4 fixes a data race noticed by Ben (also from his patch). It's unchanged. Patches 5, 6, and 7 are cleanups. Bugs? Thoughts? Jonathan Nieder (7): [media] cx88: protect per-device driver list with device lock [media] cx88: fix locking of sub-driver operations [media] cx88: hold device lock during sub-driver initialization [media] cx88: use a mutex to protect cx8802_devlist [media] cx88: handle attempts to use unregistered cx88-blackbird driver [media] cx88: don't use atomic_t for core->mpeg_users [media] cx88: don't use atomic_t for core->users drivers/media/video/cx88/cx88-blackbird.c | 41 +++++++++++++++------------- drivers/media/video/cx88/cx88-dvb.c | 2 + drivers/media/video/cx88/cx88-mpeg.c | 40 ++++++++++++++++++---------- drivers/media/video/cx88/cx88-video.c | 5 ++- drivers/media/video/cx88/cx88.h | 11 +++++-- 5 files changed, 61 insertions(+), 38 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html