From patchwork Tue Apr 13 16:55:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Chitriki X-Patchwork-Id: 92217 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 o3DGtOog024472 for ; Tue, 13 Apr 2010 16:56:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753477Ab0DMQz1 (ORCPT ); Tue, 13 Apr 2010 12:55:27 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:54582 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364Ab0DMQz0 (ORCPT ); Tue, 13 Apr 2010 12:55:26 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o3DGtMW2006339 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Apr 2010 11:55:22 -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 o3DGtLkm024688; Tue, 13 Apr 2010 11:55:21 -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 o3DGtLZ01746; Tue, 13 Apr 2010 11:55:21 -0500 (CDT) From: Deepak Chitriki To: linux-omap Cc: Deepak Chitriki , Ameya Palande , Felipe Contreras , Hiroshi Doyu , Omar Ramirez Luna , Nishanth Menon Subject: [PATCH] DSPBRIDGE:Fix Kernel memory poison overwritten after DSP_MMUFAULT Date: Tue, 13 Apr 2010 11:55:20 -0500 Message-Id: <1271177720-1299-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:56:26 +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; }