[lkml]   [2022]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [syzbot] memory leak in usb_get_configuration
On Sat, Mar 12, 2022 at 06:45:08PM +0300, Pavel Skripkin wrote:
> > Unfortunately, that won't tell us where the extra reference is coming
> > from. Here's one thing you could do if you want to continue your
> > debugging: At the start of the probe routines for carl9170, usbtest, and
> > spca501, add code to print in the kernel log the reference count value
> > for the usb_device and usb_interface. Maybe you'll be able to see where
> > the refcount goes up.
> >
> Unfortunately refcount for dev and inf stays the same at the beginning of
> each probe function:
> 6 for dev
> 3 for inf

Can you find out how those numbers compare with the values for actual
working USB devices?

Also, can you see what the device's refcount is just before the
device_add() call in usb_new_device() and just before the put_device()
call at the end of usb_disconnect() (both in drivers/usb/core/hub.c)?

If they all are consistent with each then my guess that something is
failing to drop a reference is probably wrong.

Alan Stern

 \ /
  Last update: 2022-03-12 17:03    [W:0.091 / U:3.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site