* [PATCH] fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4
@ 2012-01-24 15:44 Danny Kukawka
2012-01-25 10:49 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Danny Kukawka @ 2012-01-24 15:44 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Commit ba02fa37de80bea10d706f39f076dd848348320a disabled the
venc driver registration on OMAP4. Since the driver never gets
probed/initialised your get a dereferenceed NULL pointer if you
try to get info from /sys/kernel/debug/omapdss/venc
Return info message about disabled venc if venc_dump_regs() gets called.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/video/omap2/dss/venc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index b3e9f90..82865be 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -699,6 +699,11 @@ void venc_dump_regs(struct seq_file *s)
{
#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
+ if (cpu_is_omap44xx()) {
+ seq_printf(s, "VENC currently disabled on OMAP44xx\n");
+ return;
+ }
+
if (venc_runtime_get())
return;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4
2012-01-24 15:44 [PATCH] fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4 Danny Kukawka
@ 2012-01-25 10:49 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2012-01-25 10:49 UTC (permalink / raw)
To: Danny Kukawka; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
On Tue, 2012-01-24 at 16:44 +0100, Danny Kukawka wrote:
> Commit ba02fa37de80bea10d706f39f076dd848348320a disabled the
> venc driver registration on OMAP4. Since the driver never gets
> probed/initialised your get a dereferenceed NULL pointer if you
> try to get info from /sys/kernel/debug/omapdss/venc
>
> Return info message about disabled venc if venc_dump_regs() gets called.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/video/omap2/dss/venc.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
> index b3e9f90..82865be 100644
> --- a/drivers/video/omap2/dss/venc.c
> +++ b/drivers/video/omap2/dss/venc.c
> @@ -699,6 +699,11 @@ void venc_dump_regs(struct seq_file *s)
> {
> #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
>
> + if (cpu_is_omap44xx()) {
> + seq_printf(s, "VENC currently disabled on OMAP44xx\n");
> + return;
> + }
> +
> if (venc_runtime_get())
> return;
>
Thanks. A bit hacky, but so is the whole omap4/venc problem. I'll apply
to dss tree.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-25 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24 15:44 [PATCH] fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4 Danny Kukawka
2012-01-25 10:49 ` Tomi Valkeinen
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).