All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	YunQiang Su <wzssyqa@gmail.com>,
	684441@bugs.debian.org, Jarod Wilson <jarod@redhat.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2] [media] rc: ite-cir: Initialise ite_dev::rdev earlier
Date: Tue, 28 Aug 2012 12:44:09 +0100	[thread overview]
Message-ID: <20120828114409.GA3191@zeus> (raw)
In-Reply-To: <1345419147.22400.78.camel@deadeye.wl.decadent.org.uk>

On Mon, Aug 20, 2012 at 12:32:27AM +0100, Ben Hutchings wrote:
> ite_dev::rdev is currently initialised in ite_probe() after
> rc_register_device() returns.  If a newly registered device is opened
> quickly enough, we may enable interrupts and try to use ite_dev::rdev
> before it has been initialised.  Move it up to the earliest point we
> can, right after calling rc_allocate_device().

I believe this is the same bug:

https://bugzilla.kernel.org/show_bug.cgi?id=46391

And the bug is present in other IR devices as well.

I've sent a proposed fix:

http://marc.info/?l=linux-kernel&m=134590803109050&w=2

Cheers,
--
Luis

> 
> References: http://bugs.debian.org/684441 Reported-and-tested-by:
> YunQiang Su <wzssyqa@gmail.com> Signed-off-by: Ben Hutchings
> <ben@decadent.org.uk> Cc: stable@vger.kernel.org --- Unlike the
> previous version, this will apply cleanly to the media
> staging/for_v3.6 branch.
> 
> Ben.
> 
>  drivers/media/rc/ite-cir.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
> index 36fe5a3..24c77a4 100644
> --- a/drivers/media/rc/ite-cir.c
> +++ b/drivers/media/rc/ite-cir.c
> @@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
>  	rdev = rc_allocate_device();
>  	if (!rdev)
>  		goto failure;
> +	itdev->rdev = rdev;
>  
>  	ret = -ENODEV;
>  
> @@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
>  	if (ret)
>  		goto failure3;
>  
> -	itdev->rdev = rdev;
>  	ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
>  
>  	return 0;
> 

  parent reply	other threads:[~2012-08-28 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-19 21:24 [PATCH] [media] rc: ite-cir: Initialise ite_dev::rdev earlier Ben Hutchings
2012-08-19 23:32 ` [PATCH v2] " Ben Hutchings
2012-08-28  1:37   ` YunQiang Su
2012-08-28 11:44   ` Luis Henriques [this message]
2012-08-28 17:09     ` Ben Hutchings
2012-08-28 20:48       ` Luis Henriques
2012-09-16  4:56         ` YunQiang Su

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=20120828114409.GA3191@zeus \
    --to=luis.henriques@canonical.com \
    --cc=684441@bugs.debian.org \
    --cc=ben@decadent.org.uk \
    --cc=jarod@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=wzssyqa@gmail.com \
    /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.