From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5CF731C242D for ; Mon, 1 Dec 2014 02:52:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5A2152FAFA for ; Mon, 1 Dec 2014 02:52:33 +0000 (UTC) Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HZ+NFqp14hIb for ; Mon, 1 Dec 2014 02:52:33 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by silver.osuosl.org (Postfix) with ESMTPS id F39632F349 for ; Mon, 1 Dec 2014 02:52:32 +0000 (UTC) Date: Sun, 30 Nov 2014 18:51:10 -0800 From: Greg KH Subject: Re: Possible memory leak in function (reserve_range) not freeing pointer (regionid) Message-ID: <20141201025110.GA4331@kroah.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Ahmed Tamrawi Cc: driverdev-devel@linuxdriverproject.org On Sun, Nov 30, 2014 at 02:00:45PM -0600, Ahmed Tamrawi wrote: > Bug Report: https://bugzilla.kernel.org/show_bug.cgi?id=89101 > Linux Version [3.17-rc1] That's a very old kernel version. > Configuration: Default configuration for x86 > > > Function (reserve_range) in file (drivers/pnp/system.c) allocates > pointer (regionid) on line (32) and passes it to function > (__request_region) through the macros: (request_region) at line (38) > or (request_mem_region) at line (40). However, if the resource (res) > is allocated through (__request_region) function, then the pointer > (res->name) points to the allocated pointer (regionid). Then, there is > no way in function (free_resource) or function (release_resource) to > free the pointer (regionid) or (res->name). Thus, causing a potential > memory leak! How does this relate to the mailing list you sent this to? Please send a patch for the issue against Linus's latest kernel tree to help explain things better. thanks, greg k-h _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel