Begin forwarded message:

Date: Sun, 19 Nov 2006 08:45:31 -0800
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Bug 7552] New: Memory leak in hid_parse_report


http://bugzilla.kernel.org/show_bug.cgi?id=7552

           Summary: Memory leak in hid_parse_report
    Kernel Version: 2.6.19-rc6
            Status: NEW
          Severity: normal
             Owner: [EMAIL PROTECTED]
         Submitter: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Most recent kernel where this bug did *NOT* occur: probably before 2.6.12
Distribution: Ubuntu 6.06
Hardware Environment: Fujitsu-Siemens laptop, USB mouse
Software Environment: X, Gnome
Problem Description:

Leaked hid_collection object allocated in hid_parse_report. The object
allocation backtrace reported by kmemleak is:

unreferenced object 0xdd2259fc (size 192):
  [<c019727b>] __kmalloc_track_caller
  [<c01809a5>] __kzalloc
  [<e02dfb46>] hid_parse_report
  [<e02e1b95>] usb_hid_configure
  [<e02e2174>] hid_probe
  [<e0053ccf>] usb_probe_interface
  [<c02c05ba>] really_probe
  [<ffffffff>] 

This is actually the device->collection pointer assigned in hid_parse_report()
but not freed when the device is disconnected. My attempt to free
dev->collection in hid_free_device() didn't solve the issue. I suspect that a
dev->collection kfree is missing on the hiddev_disconnect() path but I am not
familiar with this code to provide a proper fix.

Steps to reproduce:

The bug can be reproduced by connecting and disconnecting a USB mouse. The
latest kmemleak patch needs to be applied
(http://homepage.ntlworld.com/cmarinas/kmemleak/patch-2.6.19-rc1-kmemleak-0.11.bz2),
CONFIG_DEBUG_MEMLEAK enabled and debugfs mounted on /sys/kernel/debug/. Reading
the /sys/kernel/debug/memleak file will show the backtrace of the unreferenced
objects.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to