From: Guy Martin <gmsoft@tuxicoman.be>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] stv6110x Fix kernel null pointer deref when plugging two TT s2-1600
Date: Fri, 7 May 2010 09:05:15 +0200 [thread overview]
Message-ID: <20100507090515.2fb971a7@zombie> (raw)
In-Reply-To: <20100503230924.3f560423@pedra>
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
Hi Mauro,
> This fix seem to be at the wrong place. There's nothing on stv090x.c
> that require a not null value for fe->tuner_priv.
Thanks for the review !
> So, a better fix for your bug is to add a check for fe->tuner_priv
> inside stv6110x_sleep().
Fix initialization of the TT s2-1600 card when plugging two of them in
the same box. Check for fe->tuner_priv to be set when
stv6110x_sleep() is called.
Signed-off-by : Guy Martin <gmsoft@tuxicoman.be>
Regards,
Guy
[-- Attachment #2: stv6110x-sleep-null-deref.patch --]
[-- Type: text/x-patch, Size: 987 bytes --]
diff -r 4a8d6d981f07 linux/drivers/media/dvb/frontends/stv6110x.c
--- a/linux/drivers/media/dvb/frontends/stv6110x.c Wed May 05 11:58:44 2010 -0300
+++ b/linux/drivers/media/dvb/frontends/stv6110x.c Fri May 07 08:51:18 2010 +0200
@@ -302,7 +302,10 @@
static int stv6110x_sleep(struct dvb_frontend *fe)
{
- return stv6110x_set_mode(fe, TUNER_SLEEP);
+ if (fe->tuner_priv)
+ return stv6110x_set_mode(fe, TUNER_SLEEP);
+
+ return 0;
}
static int stv6110x_get_status(struct dvb_frontend *fe, u32 *status)
diff -r 4a8d6d981f07 linux/drivers/media/dvb/ttpci/budget.c
--- a/linux/drivers/media/dvb/ttpci/budget.c Wed May 05 11:58:44 2010 -0300
+++ b/linux/drivers/media/dvb/ttpci/budget.c Fri May 07 08:51:18 2010 +0200
@@ -461,8 +461,8 @@
};
static struct isl6423_config tt1600_isl6423_config = {
- .current_max = SEC_CURRENT_515m,
- .curlim = SEC_CURRENT_LIM_ON,
+ .current_max = SEC_CURRENT_800m,
+ .curlim = SEC_CURRENT_LIM_OFF,
.mod_extern = 1,
.addr = 0x08,
};
next prev parent reply other threads:[~2010-05-07 7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-11 21:15 [PATCH] stv090x Fix kernel oops when plugging two cards Guy Martin
2010-05-04 2:09 ` Mauro Carvalho Chehab
2010-05-07 7:05 ` Guy Martin [this message]
2010-05-07 7:34 ` [PATCH v2] stv6110x Fix kernel null pointer deref when plugging two TT s2-1600 Guy Martin
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=20100507090515.2fb971a7@zombie \
--to=gmsoft@tuxicoman.be \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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