From: Johan Hovold <johan@kernel.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Jaejoong Kim <climbbb.kim@gmail.com>
Subject: Re: [PATCH] USB: cdc-acm: fix minor-number release
Date: Tue, 7 Sep 2021 10:18:59 +0200 [thread overview]
Message-ID: <YTcgc/wMDEpIpJG1@hovoldconsulting.com> (raw)
In-Reply-To: <b0af8328-52c4-e5f8-5e11-36f95f32e735@suse.com>
On Mon, Sep 06, 2021 at 03:02:43PM +0200, Oliver Neukum wrote:
>
> On 06.09.21 14:43, Johan Hovold wrote:
> > @@ -1323,8 +1324,10 @@ static int acm_probe(struct usb_interface *intf,
> > usb_get_intf(acm->control); /* undone in destruct() */
> >
> > minor = acm_alloc_minor(acm);
> > - if (minor < 0)
> > + if (minor < 0) {
> > + acm->minor = ACM_TTY_MINORS;
> > goto err_put_port;
> Congratulations for catching that one.
Heh, thanks.
> May I request to improve understandability of the code that you give
> the constant a distinct name for this purpose? Something like
>
> ACM_MINOR_POISON or ACM_INVALID_MINOR
>
> so that normal people can understand the fixed code?
Sure, I'll use ACM_MINOR_INVALID.
Johan
prev parent reply other threads:[~2021-09-07 8:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 12:43 [PATCH] USB: cdc-acm: fix minor-number release Johan Hovold
2021-09-06 13:02 ` Oliver Neukum
2021-09-07 8:18 ` Johan Hovold [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=YTcgc/wMDEpIpJG1@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=climbbb.kim@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=stable@vger.kernel.org \
/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).