mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: stable@kernel.org
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	David Liontooth <liontooth@cogweb.net>,
	linux-kernel@vger.kernel.org, video4linux-list@redhat.com,
	Brian Marete <bgmarete@gmail.com>,
	Ricardo Cerqueira <v4l@cerqueira.org>
Subject: Re: [2.6.16] saa7134 disable_ir oops
Date: Fri, 7 Apr 2006 17:36:28 +0400	[thread overview]
Message-ID: <20060407133628.GG10864@master.mivlgu.local> (raw)
In-Reply-To: <1144415771.28307.13.camel@praia>

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

On Fri, Apr 07, 2006 at 10:16:10AM -0300, Mauro Carvalho Chehab wrote:
> Em Qui, 2006-04-06 ?s 20:20 +0400, Sergey Vlasov escreveu:
> > On Fri, 24 Mar 2006 14:00:46 -0800 David Liontooth wrote:
> 
> > Does the following patch fix things?
> > 
> Applied at v4l-dvb tree. Thanks.

IMHO this patch should also be added to 2.6.16-stable - it fixes oops in
configurations which worked fine with older kernels.

-----------------------------------------------------------------------

saa7134: Fix oops with disable_ir=1

When disable_ir=1 parameter is used, or when saa7134_input_init1()
fails for any other reason, dev->remote will remain NULL, and the
driver will oops in saa7134_hwinit2().  Therefore dev->remote must be
checked before dereferencing.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

--- linux-2.6.16.orig/drivers/media/video/saa7134/saa7134-core.c	2006-03-20 08:53:29 +0300
+++ linux-2.6.16/drivers/media/video/saa7134/saa7134-core.c	2006-04-06 20:00:56 +0400
@@ -543,6 +543,8 @@ static irqreturn_t saa7134_irq(int irq, 
 		if (report & SAA7134_IRQ_REPORT_GPIO16) {
 			switch (dev->has_remote) {
 				case SAA7134_REMOTE_GPIO:
+					if (!dev->remote)
+						break;
 					if  (dev->remote->mask_keydown & 0x10000) {
 						saa7134_input_irq(dev);
 					}
@@ -559,6 +561,8 @@ static irqreturn_t saa7134_irq(int irq, 
 		if (report & SAA7134_IRQ_REPORT_GPIO18) {
 			switch (dev->has_remote) {
 				case SAA7134_REMOTE_GPIO:
+					if (!dev->remote)
+						break;
 					if ((dev->remote->mask_keydown & 0x40000) ||
 					    (dev->remote->mask_keyup & 0x40000)) {
 						saa7134_input_irq(dev);
@@ -671,7 +675,7 @@ static int saa7134_hwinit2(struct saa713
 		SAA7134_IRQ2_INTE_PE      |
 		SAA7134_IRQ2_INTE_AR;
 
-	if (dev->has_remote == SAA7134_REMOTE_GPIO) {
+	if (dev->has_remote == SAA7134_REMOTE_GPIO && dev->remote) {
 		if (dev->remote->mask_keydown & 0x10000)
 			irq2_mask |= SAA7134_IRQ2_INTE_GPIO16;
 		else if (dev->remote->mask_keydown & 0x40000)


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-04-07 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 22:00 David Liontooth
2006-04-06 16:20 ` Sergey Vlasov
2006-04-07  1:03   ` David Liontooth
2006-04-07 17:19     ` Sergey Vlasov
2006-04-07 13:16   ` Mauro Carvalho Chehab
2006-04-07 13:36     ` Sergey Vlasov [this message]
2006-04-07 21:40       ` Hartmut Hackmann

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=20060407133628.GG10864@master.mivlgu.local \
    --to=vsu@altlinux.ru \
    --cc=bgmarete@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liontooth@cogweb.net \
    --cc=mchehab@infradead.org \
    --cc=stable@kernel.org \
    --cc=v4l@cerqueira.org \
    --cc=video4linux-list@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®