Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754038AbZGPIrB (ORCPT ); Thu, 16 Jul 2009 04:47:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753253AbZGPIrB (ORCPT ); Thu, 16 Jul 2009 04:47:01 -0400 Received: from cam-admin0.cambridge.arm.com ([193.131.176.58]:47382 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752590AbZGPIrA (ORCPT ); Thu, 16 Jul 2009 04:47:00 -0400 Subject: Re: Memory leak issues in drm From: Catalin Marinas To: Jaswinder Singh Rajput Cc: Dave Airlie , Andrew Morton , airlied@gmail.com, LKML , Eric Anholt In-Reply-To: <1247728158.2543.4.camel@ht.satnam> References: <1247720877.2532.4.camel@ht.satnam> <1247728158.2543.4.camel@ht.satnam> Content-Type: text/plain Organization: ARM Ltd Date: Thu, 16 Jul 2009 09:44:48 +0100 Message-Id: <1247733888.24965.3.camel@pc1117.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jul 2009 08:44:48.0986 (UTC) FILETIME=[AD8433A0:01CA05F1] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1472 Lines: 38 On Thu, 2009-07-16 at 12:39 +0530, Jaswinder Singh Rajput wrote: > On Thu, 2009-07-16 at 10:37 +0530, Jaswinder Singh Rajput wrote: > > On linus tree, while investigating kmemleak issues in drm : > > > > unreferenced object 0xf571dea0 (size 32): > > comm "Xorg", pid 1992, jiffies 4294703188 > > backtrace: > > [] create_object+0x140/0x210 > > [] kmemleak_alloc+0x25/0x4b > > [] __kmalloc+0xcb/0x153 > > [] drm_setversion+0x154/0x1f6 > > [] drm_ioctl+0x211/0x296 > > [] vfs_ioctl+0x50/0x69 > > [] do_vfs_ioctl+0x49b/0x4d5 > > [] sys_ioctl+0x2c/0x45 > > [] sysenter_do_call+0x12/0x36 > > [] 0xffffffff > > > > This fixes above memory leak in drm because it was allocating again on > dev->devname without freeing previous instance and more memory related > issues, hope this will be helpful: Thanks for looking into this (I haven't tried the patch yet but it seems that you found the cause of the leak). In case you have time, I reported this as well and another in the drm code - http://lkml.org/lkml/2009/7/9/110 - which happens when a graphics application exits. -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/