Hi,

(please cc me as I am not subscribed to this list)

While testing kmemleak, I came across a leak reported in
hid_parse_report. The backtrace of the memory allocation is:

orphan pointer 0xdbed5ec4 (size 192):
  c018d3e3: <__kmalloc_track_caller>
  c0177805: <__kzalloc>
  e01e6dc6: <hid_parse_report>
  e01e8af7: <usb_hid_configure>
  e01e9394: <hid_probe>
  e00535ef: <usb_probe_interface>
  c029efc5: <driver_probe_device>
  c029f13f: <__driver_attach>

This is actually the device->collection pointer assigned in
hid_parse_report() but not freed when the device is disconnected. I
reproduce this by connecting and disconnecting a USB mouse on my
laptop.

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.

Thanks.

-- 
Catalin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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