From: David Mansfield Subject: memory leak in radeon.ko Date: Mon, 30 Aug 2010 15:54:38 -0400 Message-ID: <1283198078.3203.28.camel@gandalf.cobite.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from iris.cobite.com (unknown [38.105.216.129]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E9549E759 for ; Mon, 30 Aug 2010 13:19:34 -0700 (PDT) Received: from localhost (iris.cobite.com [127.0.0.1]) by iris.cobite.com (Postfix) with ESMTP id EA2776B282 for ; Mon, 30 Aug 2010 15:54:37 -0400 (EDT) Received: from iris.cobite.com ([127.0.0.1]) by localhost (iris.cobite.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yhMrtL4zlWlW for ; Mon, 30 Aug 2010 15:54:36 -0400 (EDT) Received: from [208.222.80.105] (gandalf.cobite.com [208.222.80.105]) by iris.cobite.com (Postfix) with ESMTP id E796B6B281 for ; Mon, 30 Aug 2010 15:54:35 -0400 (EDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi, I'm trying to track down an apparent memory leak in my Fedora 13 system that seems to be in the radeon kernel module. I have no proof the bug is in the radeon driver except that that same sequence will not trigger the leak on a similar box with using nouveau driver but can be reproduced on a simylar box alse WITH radeon r600. My use case is, go to images.google.com, search for something, then scroll the page up and down furiously. You will lose 1GB of dynamic kernel allocations is about 5 seconds. The version I'm running is from Fedora 13 updates, which after comparing with latest git seems quite a bit behind the current version. I have examined the radeon code in the F13 kernel and found an apparent leak in the r600_cs.c module (my card is r600 based). The "p->track" allocation is never freed (allocated line 763, probably should be freed line 821 or so). It seems we need this: --- r600_cs.c.orig 2010-08-30 13:34:56.793198147 -0400 +++ r600_cs.c 2010-08-30 13:36:10.021198095 -0400 @@ -826,6 +826,7 @@ } kfree(parser->chunks); kfree(parser->chunks_array); + kfree(parser->track); } This does not seem to the case in latest git code, where "p->track" is handled somewhat differently. The question is, is it possible this leak can cause a GB of damage in seconds? If so, does the above use case seem likely to trigger? BTW, I have a bug in rh bugzilla for this, https://bugzilla.redhat.com/show_bug.cgi?id=615505 -- Thanks, David Mansfield Cobite, INC.