All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Josu Lazkano <josu.lazkano@gmail.com>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: Re: dvb lock patch
Date: Sat, 24 Mar 2012 11:32:48 -0300	[thread overview]
Message-ID: <4F6DDB10.8000503@redhat.com> (raw)
In-Reply-To: <CAL9G6WXZLdJqpivn2qNXb+oP9o4n=uyq6ywiRrzP13vmUYvaxw@mail.gmail.com>

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.

  parent reply	other threads:[~2012-03-24 14:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04 20:49 dvb lock patch Josu Lazkano
     [not found] ` <4f6ca10f.e503b40a.4448.ffffc0feSMTPIN_ADDED@mx.google.com>
2012-03-23 16:15   ` Josu Lazkano
2012-03-24 14:32 ` Mauro Carvalho Chehab [this message]
2012-04-17 13:30   ` Josu Lazkano
2012-04-18 18:58     ` Ezequiel García
2012-04-18 19:19       ` Mauro Carvalho Chehab
2012-04-18 20:13         ` Josu Lazkano
2012-04-19 22:39           ` Torfinn Ingolfsen
2012-04-21 12:18             ` Josu Lazkano
2012-04-23 11:01               ` Torfinn Ingolfsen

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=4F6DDB10.8000503@redhat.com \
    --to=mchehab@redhat.com \
    --cc=josu.lazkano@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /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.