From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A217C54EE9 for ; Mon, 19 Sep 2022 13:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbiISN3f (ORCPT ); Mon, 19 Sep 2022 09:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbiISN3e (ORCPT ); Mon, 19 Sep 2022 09:29:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74F562D9 for ; Mon, 19 Sep 2022 06:29:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97270B81BDA for ; Mon, 19 Sep 2022 13:29:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D8E2C433D6; Mon, 19 Sep 2022 13:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663594171; bh=lnW4/UF/39NaRDAt1go1GRpAjNwMdCNszzzlMdkeeXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FhMROE6V2UoOpl0PlqyPnRna71ioNNYmAR9qwJfWyQ8fZzLtHiAM+LDzMor+4MX3P r3sAb+DjBJ64fj1FkUi2QMMYp2Vbgr4Qju9pMkKuvlsv+bgmx9gGNoPVwGvc2cB3AS AMsHmbFXUswHIDo3SAFy/2wpTz+0Qv3MOo8Ke5CCKLzqpbTDLmifH3XuhmUX5hNIvc E84lehDLfnIsN+j1bd26a20AGAf5tRP3+0vYtPDlzswzix1NE60EsAZzopfjyyawcm J2AIyiR+pdItHjKWp8ps6/+LLEEc0ktmL0j6CrQrD/7N+whRAcDNU7U2+b+QyQVXoc zWsV3FENOAR1w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oaGq8-0005VA-6l; Mon, 19 Sep 2022 15:29:36 +0200 Date: Mon, 19 Sep 2022 15:29:36 +0200 From: Johan Hovold To: Liang He Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v2] USB: serial: console: Move mutex_unlock() before usb_serial_put() Message-ID: References: <20220919104824.4104898-1-windhl@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220919104824.4104898-1-windhl@126.com> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Sep 19, 2022 at 06:48:24PM +0800, Liang He wrote: > While in current version there is no use-after-free as USB serial > core holds another reference when the console is registered, we > should better unlock before dropping the reference in > usb_console_setup(). > > Fixes: 7bd032dc2793 ("USB serial: update the console driver") > Signed-off-by: Liang He Applied, thanks. Johan