Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3535444pxb; Tue, 7 Sep 2021 01:36:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhZ4/2phzPT5gPZ89/OvK024sqUQHwM4/LnFB7GOLt48BFFNZmyT4SJTY9xOIA5t3NQ84P X-Received: by 2002:a05:6638:238c:: with SMTP id q12mr14604562jat.70.1631003781289; Tue, 07 Sep 2021 01:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631003781; cv=none; d=google.com; s=arc-20160816; b=gvL+NkHLQMaO1JsL5OoUZvPN5ULWpRfXkfZJho5pCxDvr7NYZdJrrGjT6eVGP7r+eh STXHXZQjR1G+z0blAgHw6nUmJMydlthKUiPp2PtP7r+cu9gSkPAZ1JsO4DayVESTYg++ fqLwXGyyqu6JBG1mESw/xd/rEaoODvGrLACea8jb1yg5n1hrfswgmZnozz7nPQhAJGmL dpLO8a/PeFYoB8WEt9/SqhLzdP0aJhIQKVDFPFSyfEDIssSax95LaqrAoaY9//zPVCrv Oe981Pefg5EWAhHTx0guIPqlcHQ9dLrFaA90hx770iCEhS4THI1N0Gt9GbyV7eFA8yas nU2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cX+Qsg4+WFvk3uWJRert9FCvZXJ1Co6wtQCjGLOVIaA=; b=MUd4Iiwwa5JDO+2Omk800Pg5tCWGKVhLP3Whq47aw6q3FssTvCGyCTpvadYX58UUXL dIKNY1PQV3FRLedxWUn4a3VHHHk9DgC0XOYpfvul2W1Ij1m8viiKEjIFW3brHZhyIE3q 3DNSXoGCZlCDz6ZNwqp2QOueBJOuXOksqyU8iJvqO9FwIpaTXro8jQCLLpi/oOwsV3nt CvubzfCkJBIiKwuA6Zsb+rRVccfOJY+P+0W/08x4oUUBbx59cfgpvvNP6WJ3Co0Zahh/ c6B3YckB2pZW6aSrpMOh5X40DS7RNRfM4GXQjiv5S0GtgO9ztwtbSK32zAl19Bh0joPo ptyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GwrFcHOm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c32si9003994jaa.44.2021.09.07.01.36.09; Tue, 07 Sep 2021 01:36:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GwrFcHOm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241261AbhIGIUX (ORCPT + 99 others); Tue, 7 Sep 2021 04:20:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:45140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236269AbhIGIUR (ORCPT ); Tue, 7 Sep 2021 04:20:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6EA3E6108E; Tue, 7 Sep 2021 08:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631002751; bh=W647jj4n/AXY270eoCzaSU0MNI6C5cZZM2tLOwvy4dY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GwrFcHOmtxjGue4i9D6qdqgrvk0OR6iC3tV0naM/bXv9Oj+uGVMuJyYkVRQ+9Oywg sT7ipWMNYjguL8dVntyII+SJfz+C3A0cHmglfMYUQ7/u22AX+oWg6+Pngf7Nwhmj7R BS0XesHF94zOfSJmuARfbxF13M8QurSS4yBX3fvXnhIkhQcQQcLq1TcI9kyREGt6fm GDd/tiImzApHen6zXo+Y/QFgbTir7vMZ5OyAhMZbE9WwqTVv+8zDQig6/ZPceaQqfv 3/L9po5mIvfjwtpxfZGYMCzss4JBCGrfUl3ykDVAIJP+YqOGsq26GoWMpqMjvcG3DD Hu/c0YnueZHaQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1mNWJn-00013I-Db; Tue, 07 Sep 2021 10:18:59 +0200 Date: Tue, 7 Sep 2021 10:18:59 +0200 From: Johan Hovold To: Oliver Neukum Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jaejoong Kim Subject: Re: [PATCH] USB: cdc-acm: fix minor-number release Message-ID: References: <20210906124339.22264-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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