All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory leak in cpufreq-nforce2.c
@ 2007-08-23 12:21 GW
  2007-08-24 17:43 ` Sebastian Witt
  0 siblings, 1 reply; 2+ messages in thread
From: GW @ 2007-08-23 12:21 UTC (permalink / raw)
  To: cpufreq

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Memory leak in cpufreq-nforce2.c
  2007-08-23 12:21 Memory leak in cpufreq-nforce2.c GW
@ 2007-08-24 17:43 ` Sebastian Witt
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Witt @ 2007-08-24 17:43 UTC (permalink / raw)
  To: GW; +Cc: cpufreq

Hello,

GW wrote:

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

Yes, pci_dev_put(nforce2_chipset_dev) is missing in nforce2_exit()...

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

...unfortunately I don't own the original hardware with nForce2 chipset anymore.
     I don't think a patch for correcting this bug modifies the expected
behaviour...but it should be tested by someone who ones compatible hardware.

Regards,
Sebastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-24 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23 12:21 Memory leak in cpufreq-nforce2.c GW
2007-08-24 17:43 ` Sebastian Witt

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.