From patchwork Tue Apr 13 16:46:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Chitriki X-Patchwork-Id: 92215 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3DGlFNh022044 for ; Tue, 13 Apr 2010 16:47:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753424Ab0DMQqv (ORCPT ); Tue, 13 Apr 2010 12:46:51 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44341 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753467Ab0DMQqp (ORCPT ); Tue, 13 Apr 2010 12:46:45 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o3DGkjeh025010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 13 Apr 2010 11:46:45 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o3DGkj9m021674; Tue, 13 Apr 2010 11:46:45 -0500 (CDT) Received: from localhost (soldel-laptop-128247079079.am.dhcp.ti.com [128.247.79.79]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o3DGkiZ01064; Tue, 13 Apr 2010 11:46:45 -0500 (CDT) From: Deepak Chitriki To: linux-omap Cc: Deepak Chitriki Subject: [PATCH] DSPBRIDGE:Fix Kernel memory poison overwritten after DSP_MMUFAULT Date: Tue, 13 Apr 2010 11:46:40 -0500 Message-Id: <1271177200-1054-1-git-send-email-deepak.chitriki@ti.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 13 Apr 2010 16:47:16 +0000 (UTC) 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; }