All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ahmed Tamrawi <ahmedtamrawi@gmail.com>
Cc: driverdev-devel@linuxdriverproject.org
Subject: Re: Possible memory leak in function (reserve_range) not freeing pointer (regionid)
Date: Sun, 30 Nov 2014 18:51:10 -0800	[thread overview]
Message-ID: <20141201025110.GA4331@kroah.com> (raw)
In-Reply-To: <CAFZT-jJ3aT0uNGJ2Vy7-EGmjXgO-XAftpJ0BY-yx_JcOxuM2OQ@mail.gmail.com>

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

  reply	other threads:[~2014-12-01  2:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-30 20:00 Possible memory leak in function (reserve_range) not freeing pointer (regionid) Ahmed Tamrawi
2014-12-01  2:51 ` Greg KH [this message]
2014-12-01  3:49   ` Ahmed Tamrawi
2014-12-03  8:48     ` Dan Carpenter
2014-12-03 16:38       ` Ahmed Tamrawi
2014-12-04  1:12     ` Greg KH
2014-12-01  1:08 Ahmed Tamrawi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141201025110.GA4331@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ahmedtamrawi@gmail.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.