From: Luis Henriques <luis.henriques@canonical.com>
To: Matthijs Kooijman <matthijs@stdin.nl>
Cc: linux-media@vger.kernel.org, Jarod Wilson <jarod@redhat.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: (still) NULL pointer crashes with nuvoton_cir driver
Date: Fri, 17 Aug 2012 16:04:15 +0100 [thread overview]
Message-ID: <20120817150415.GC2693@zeus> (raw)
In-Reply-To: <20120816080932.GP21274@login.drsnuggles.stderr.nl>
(Adding Mauro to CC has he is the maintainer)
On Thu, Aug 16, 2012 at 10:09:32AM +0200, Matthijs Kooijman wrote:
> Hi folks,
>
> > I'm currently compiling a 3.5 kernel with just the rdev initialization
> > moved up to see if this will fix my problem at all, but I'd like your
> > view on this in the meantime as well.
> Ok, this seems to fix my problem:
>
> --- a/drivers/media/rc/nuvoton-cir.c
> +++ b/drivers/media/rc/nuvoton-cir.c
> @@ -1066,6 +1066,7 @@
> /* tx bits */
> rdev->tx_resolution = XYZ;
> #endif
> + nvt->rdev = rdev;
This makes sense to me. Note however that there are more drivers with
a similar problem (e.g., fintek-cir.c).
>
> ret = -EBUSY; /* now claim resources */ @@ -1090,7 +1091,6
> @@ goto failure5;
>
> device_init_wakeup(&pdev->dev, true);
> - nvt->rdev = rdev;
> nvt_pr(KERN_NOTICE, "driver has been successfully loaded\n");
> if (debug) {
> cir_dump_regs(nvt);
>
>
> I'm still not sure if the rc_register_device shouldn't also be moved up. It
> seems this doesn't trigger a problem right now, but if there is a problem, I
> suspect its trigger window is a lot smaller than with the rdev initialization
> problem...
I'm not sure as well, I'm not very familiar with this code. However,
it looks like the IRQ request should actually be one of the last
things to do here.
Cheers,
--
Luis
next prev parent reply other threads:[~2012-08-17 15:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 16:51 (still) NULL pointer crashes with nuvoton_cir driver Matthijs Kooijman
2012-08-16 8:09 ` Matthijs Kooijman
2012-08-17 15:04 ` Luis Henriques [this message]
2012-09-10 14:46 ` Mauro Carvalho Chehab
2012-10-15 11:01 ` Matthijs Kooijman
2012-10-15 11:13 ` [PATCH 1/4] [media] ene-ir: Fix cleanup on probe failure Matthijs Kooijman
2012-10-15 11:13 ` [PATCH 2/4] [media] rc: Make probe cleanup goto labels more verbose Matthijs Kooijman
2012-10-15 11:13 ` [PATCH 3/4] [media] rc: Set rdev before irq setup Matthijs Kooijman
2012-10-15 11:13 ` [PATCH 4/4] [media] rc: Call rc_register_device " Matthijs Kooijman
2012-10-15 12:32 ` (still) NULL pointer crashes with nuvoton_cir driver Luis Henriques
2012-10-15 14:44 ` Matthijs Kooijman
2012-10-15 16:37 ` Matthijs Kooijman
2012-11-02 13:13 ` Updated patches for (potential) NULL pointer crashes in cir drivers Matthijs Kooijman
2012-11-02 13:13 ` [PATCH 1/3] [media] rc: Make probe cleanup goto labels more verbose Matthijs Kooijman
2012-11-02 13:13 ` [PATCH 2/3] [media] rc: Set rdev before irq setup Matthijs Kooijman
2012-11-02 13:13 ` [PATCH 3/3] [media] rc: Call rc_register_device " Matthijs Kooijman
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=20120817150415.GC2693@zeus \
--to=luis.henriques@canonical.com \
--cc=jarod@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=matthijs@stdin.nl \
--cc=mchehab@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).