From: Deepak Chitriki <deepak.chitriki@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] DSPBRIDGE:Fix Kernel memory poison overwritten after DSP_MMUFAULT
Date: Tue, 13 Apr 2010 11:54:53 -0500 [thread overview]
Message-ID: <4BC4A1DD.3060700@ti.com> (raw)
In-Reply-To: <1271177200-1054-1-git-send-email-deepak.chitriki@ti.com>
Please ignore this patch.
Thanks,
Deepak
Chitriki Rudramuni, Deepak wrote:
> kmalloc() does not guarantee page aligned memory always,hence
> resulting in virtual addresses not getting aligned to page boundary.
> This patch replaces kmalloc() with __get_free_pages() which
> allocates kernel memory in terms of PAGES fixing the Kernel
> memory corruption after DSP_MMUFAULT.
>
> Signed-off-by: Deepak Chitriki <deepak.chitriki@ti.com>
> ---
> drivers/dsp/bridge/wmd/ue_deh.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
> index 14dd8ae..7ed5f60 100644
> --- a/drivers/dsp/bridge/wmd/ue_deh.c
> +++ b/drivers/dsp/bridge/wmd/ue_deh.c
> @@ -239,7 +239,8 @@ void bridge_deh_notify(struct deh_mgr *hdeh_mgr, u32 ulEventMask, u32 dwErrInfo)
> "bridge_deh_notify: DSP_MMUFAULT, fault "
> "address = 0x%x\n", (unsigned int)fault_addr);
> dummy_va_addr =
> - (u32) mem_calloc(sizeof(char) * 0x1000, MEM_PAGED);
> + (void *)__get_free_pages(GFP_ATOMIC | __GFP_ZERO,
> + 0);
> mem_physical =
> VIRT_TO_PHYS(PG_ALIGN_LOW
> ((u32) dummy_va_addr, PG_SIZE4K));
> @@ -338,6 +339,6 @@ dsp_status bridge_deh_get_info(struct deh_mgr *hdeh_mgr,
> */
> void bridge_deh_release_dummy_mem(void)
> {
> - kfree((void *)dummy_va_addr);
> + free_pages((void *)dummy_va_addr, 0);
> dummy_va_addr = 0;
> }
>
next prev parent reply other threads:[~2010-04-13 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 16:46 [PATCH] DSPBRIDGE:Fix Kernel memory poison overwritten after DSP_MMUFAULT Deepak Chitriki
2010-04-13 16:54 ` Deepak Chitriki [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-04-13 16:55 Deepak Chitriki
2010-04-19 18:25 ` Guzman Lugo, Fernando
2010-05-12 19:39 ` Felipe Contreras
2010-05-12 21:09 ` Guzman Lugo, Fernando
2010-05-13 11:39 ` Felipe Contreras
2010-05-13 17:29 ` Guzman Lugo, Fernando
2010-05-13 18:29 ` Felipe Contreras
2010-05-13 21:15 ` Guzman Lugo, Fernando
2010-05-13 22:33 ` Felipe Contreras
2010-05-14 12:08 ` Felipe Contreras
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=4BC4A1DD.3060700@ti.com \
--to=deepak.chitriki@ti.com \
--cc=linux-omap@vger.kernel.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 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.