From: Jiri Kosina <jikos@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Dongliang Mu <mudongliangabcd@gmail.com>,
Salah Triki <salah.triki@gmail.com>,
benjamin.tissoires@redhat.com, linux-input@vger.kernel.org,
linux-usb@vger.kernel.org, noralf@tronnes.org,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
tzimmermann@suse.de
Subject: Re: [PATCH] HID: elo: Fix refcount leak in elo_probe()
Date: Thu, 17 Feb 2022 14:21:02 +0100 (CET) [thread overview]
Message-ID: <nycvar.YFH.7.76.2202171420080.11721@cbobk.fhfr.pm> (raw)
In-Reply-To: <20220217080459.GB2407@kadam>
On Thu, 17 Feb 2022, Dan Carpenter wrote:
> > The refcount was added less than a year ago by Salah Triki in commit
> > fbf42729d0e9 ("HID: elo: update the reference count of the usb device
> > structure"), but the commit message doesn't explain why it is
> > necessary. There certainly isn't any obvious reason for it; the driver
> > doesn't release any references after elo_remove() returns and we know
> > that the usb_device structure won't be deallocated before the driver
> > gets unbound.
>
> Salah sent a bunch of these. The reasoning was explained in this email.
>
> https://www.spinics.net/lists/kernel/msg4026672.html
>
> When he resent the patch, Greg said that taking the reference wasn't
> needed so the patch wasn't applied. (Also it had the same reference
> leak so that's a second reason it wasn't applied).
Sorry for late response, I've been away for a week. I have now queued
revert of all this mess and will be sending it to Linus for 5.17 still.
Thanks everybody for reporting.
--
Jiri Kosina
SUSE Labs
next prev parent reply other threads:[~2022-02-17 13:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0000000000005cacef05d7c3c10d@google.com>
2022-02-11 21:23 ` [syzbot] memory leak in hub_event (3) Alan Stern
2022-02-11 21:36 ` syzbot
2022-02-12 1:50 ` [PATCH] HID: elo: Fix refcount leak in elo_probe() Alan Stern
2022-02-14 7:34 ` Dongliang Mu
2022-02-14 14:41 ` Alan Stern
2022-02-17 8:04 ` Dan Carpenter
2022-02-17 8:19 ` Dan Carpenter
2022-02-17 13:21 ` Jiri Kosina [this message]
2022-02-17 15:25 ` Alan Stern
2022-02-25 9:15 ` Greg KH
2022-03-12 9:39 ` Dongliang Mu
2022-03-12 14:59 ` Alan Stern
2022-02-17 7:54 ` Dan Carpenter
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=nycvar.YFH.7.76.2202171420080.11721@cbobk.fhfr.pm \
--to=jikos@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mudongliangabcd@gmail.com \
--cc=noralf@tronnes.org \
--cc=salah.triki@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).