From: Alan Stern <stern@rowland.harvard.edu>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: syzbot <syzbot+f0fae482604e6d9a87c9@syzkaller.appspotmail.com>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, pavel.hofman@ivitera.com,
rob@robgreener.com, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] memory leak in usb_get_configuration
Date: Sat, 12 Mar 2022 11:02:26 -0500 [thread overview]
Message-ID: <YizEEq6gib/FNLKr@rowland.harvard.edu> (raw)
In-Reply-To: <d82e80ed-566d-9516-2cc2-60278b56ea8d@gmail.com>
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
prev parent reply other threads:[~2022-03-12 16:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 23:54 syzbot
2022-03-10 9:51 ` Oliver Neukum
2022-03-10 14:36 ` syzbot
2022-03-10 15:29 ` Alan Stern
2022-03-10 11:07 ` Oliver Neukum
2022-03-10 11:07 ` syzbot
2022-03-11 21:01 ` Alan Stern
2022-03-11 21:10 ` syzbot
2022-03-12 15:08 ` Pavel Skripkin
2022-03-12 15:25 ` Alan Stern
2022-03-12 15:45 ` Pavel Skripkin
2022-03-12 16:02 ` Alan Stern [this message]
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=YizEEq6gib/FNLKr@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=paskripkin@gmail.com \
--cc=pavel.hofman@ivitera.com \
--cc=rob@robgreener.com \
--cc=syzbot+f0fae482604e6d9a87c9@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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
all inboxes | Powered by JetHome®