cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: GW <gw.kernel@tnode.com>
To: cpufreq@lists.linux.org.uk
Subject: Memory leak in cpufreq-nforce2.c
Date: Thu, 23 Aug 2007 14:21:58 +0200	[thread overview]
Message-ID: <46CD7BE6.5040904@tnode.com> (raw)

Hello.

I accidentally found something missing in cpufreq-nforce2.c and asked on linux-pci mailing list about it:

Greg KH wrote:
> On Wed, Aug 22, 2007 at 11:27:29PM +0200, GW wrote:
>> I was wondering if after every usage of pci_get_subsys() when you
>> don't need the device anymore you need to call pci_dev_put(dev)?
> 
> Yes, that is a requirement.
> 
> I don't understand why you would think it would not be necessary.

This means that there are some memory leaks in the following driver that uses pci_get_subsys(), but no pci_dev_put():

arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
  in function nforce2_fsb_read()
  in function __exit nforce2_exit(), because in __init nforce2_init() it calls nforce2_detect_chipset() that doesn't release the device

I don't have this chip, therefore I couldn't test a patch if I would written it.


    gw

             reply	other threads:[~2007-08-23 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23 12:21 GW [this message]
2007-08-24 17:43 ` Memory leak in cpufreq-nforce2.c Sebastian Witt

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=46CD7BE6.5040904@tnode.com \
    --to=gw.kernel@tnode.com \
    --cc=cpufreq@lists.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox