lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YTcgc/wMDEpIpJG1@hovoldconsulting.com>
Date:   Tue, 7 Sep 2021 10:18:59 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Oliver Neukum <oneukum@...e.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org, Jaejoong Kim <climbbb.kim@...il.com>
Subject: Re: [PATCH] USB: cdc-acm: fix minor-number release

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ