From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: linux-kernel@vger.kernel.org,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Wentao Liang <vulab@iscas.ac.cn>
Subject: Re: [PATCH] comedi: comedi_bond: Fix leak of opened device references
Date: Wed, 4 Nov 2026 15:04:37 +0100 [thread overview]
Message-ID: <2026110417-quickness-embattled-7482@gregkh> (raw)
In-Reply-To: <f6c42bba-e4c7-494e-b22a-a56ce153d71d@mev.co.uk>
On Wed, Nov 04, 2026 at 02:00:17PM +0000, Ian Abbott wrote:
> On 04/11/2026 12:59, Greg Kroah-Hartman wrote:
> > On Tue, Nov 03, 2026 at 05:36:10PM +0000, Ian Abbott wrote:
> > > bonding_attach() calls do_dev_config() to open other comedi devices
> > > specified by the user and tries to make use of them as part of the
> > > 'bonding' device. If it successfully opens the other device but cannot
> > > use it (either because it does not any subdevices of a type the
> > > 'bonding' device can use, or because of some error that occurs while
> > > dealing with its subdevices) then it is left in the open state and the
> > > fact that it is open does not get recorded by the 'bonding' device, so
> > > the reference to the opened device gets lost. Fix it by closing the
> > > opened device if it could not be bound to the 'bonding' device.
> > >
> > > To match previous behavior, if the opened device is unsuitable then
> > > ignore it (after closing it). The opened devices recorded by the
> > > 'bonding' device will eventually get closed by bonding_detach() even if
> > > bonding_attach() returns an error.
> > >
> > > Fixes: 3cf840f65ad5 ("Staging: comedi: add comedi_bond driver")
> > > Reported-by: Wentao Liang <vulab@iscas.ac.cn>
> >
> > This is a known bot. I'll be glad to take this patch if you redo it
> > from you and that you take the authorship. As-is, I can't take it from
> > this fake "author", sorry.
> >
> > greg k-h
>
> Actually, I did redo it in a completely different way to the original patch.
> I just used the original patch as a bug report. Should I remove just the
> "Reported-by:" line, or should I also remove the "Link:" to the original
> patch from the bot?
Ah crap, I missed that this was reported-by and not the author. I'll go
take this as-is, my fault, sorry for the noise.
greg k-h
prev parent reply other threads:[~2026-11-04 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 17:36 Ian Abbott
2026-11-04 12:59 ` Greg Kroah-Hartman
2026-11-04 14:00 ` Ian Abbott
2026-11-04 14:04 ` Greg Kroah-Hartman [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=2026110417-quickness-embattled-7482@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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®