2012/3/24 Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>: > Em 04-03-2012 17:49, Josu Lazkano escreveu: >> Hello all, I am using this patch to get virtual adapters for DVB >> devices: https://aur.archlinux.org/packages/sa/sascng-linux3-patch/sascng-linux3-patch.tar.gz >> >> Here is more info: https://aur.archlinux.org/packages.php?ID=51325 >> >> Is it possible to add this patch on the dvb source? >> >> This patch is needed for people who not have a CI and need to create >> virtual adapters to get a working pay-tv system. > > Please always send the diff, instead to a point to some tarball, otherwise > most developers won't care enough to see what's there. > > Anyway: > >> diff -Nur linux-2.6.39/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.39/drivers/media/dvb/dvb-core/dvbdev.c >> --- linux-2.6.39/drivers/media/dvb/dvb-core/dvbdev.c >> +++ linux-2.6.39/drivers/media/dvb/dvb-core/dvbdev.c >> @@ -83,8 +83,11 @@ static int dvb_device_open(struct inode *inode, struct file *file) >> file->f_op = old_fops; >> goto fail; >> } >> - if(file->f_op->open) >> + if(file->f_op->open) { >> + mutex_unlock(&dvbdev_mutex); >> err = file->f_op->open(inode,file); >> + mutex_lock(&dvbdev_mutex); >> + } >> if (err) { >> fops_put(file->f_op); >> file->f_op = fops_get(old_fops); >> -- >> > > That doesn't sound right to me, and can actually cause race issues. > > Regards, > Mauro. Thanks for the patch Mauro. Regards. -- Josu Lazkano -- 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