From: Tony Lindgren <tony@atomide.com>
To: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] dsp_fbexport: use kzalloc
Date: Fri, 10 Nov 2006 01:52:46 +0200 [thread overview]
Message-ID: <20061109235246.GS16172@atomide.com> (raw)
In-Reply-To: <85odridx2n.fsf@orfeo.duckcorp.org>
* Arnaud Patard <arnaud.patard@rtp-net.org> [061108 13:08]:
>
> The dsp_export function calls omapfb_register_client() right after
> allocating the memory with kmalloc.
> A commit added to omapfb_register_client() a check on the value of
> plane_idx in the notified block structure. As we're only using kmalloc,
> you may end-up comparing garbage/random values (It even leads to a oops
> on my n770).
> Using kzalloc() fixes the issue.
>
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> ---
>
> ---
> arch/arm/plat-omap/dsp/dsp_mem.c | 2 1 + 1 - 0 !
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-omap-2.6/arch/arm/plat-omap/dsp/dsp_mem.c
> ===================================================================
> --- linux-omap-2.6.orig/arch/arm/plat-omap/dsp/dsp_mem.c 2006-11-07 23:43:12.000000000 +0100
> +++ linux-omap-2.6/arch/arm/plat-omap/dsp/dsp_mem.c 2006-11-07 23:43:30.000000000 +0100
> @@ -1495,7 +1495,7 @@ static int dsp_fbexport(dsp_long_t *dspa
> #endif
>
> #ifdef CONFIG_FB_OMAP_LCDC_EXTERNAL
> - omapfb_nb = kmalloc(sizeof(struct omapfb_notifier_block), GFP_KERNEL);
> + omapfb_nb = kzalloc(sizeof(struct omapfb_notifier_block), GFP_KERNEL);
> if (omapfb_nb == NULL) {
> printk(KERN_ERR
> "omapdsp: failed to allocate memory for omapfb_nb!\n");
Pushing today.
Tony
prev parent reply other threads:[~2006-11-09 23:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 10:58 [PATCH] dsp_fbexport: use kzalloc Arnaud Patard
2006-11-09 23:52 ` Tony Lindgren [this message]
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=20061109235246.GS16172@atomide.com \
--to=tony@atomide.com \
--cc=arnaud.patard@rtp-net.org \
--cc=linux-omap-open-source@linux.omap.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.