Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp579108rwd; Thu, 1 Jun 2023 04:14:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TNDgwx6mHfWClyTbWSTtPK/16Xntpp1tWLuVv7ofiPJM9NPPgXojPcgNcZLAYv/WlB7VG X-Received: by 2002:a05:6a21:6d9f:b0:10b:58f1:7a6f with SMTP id wl31-20020a056a216d9f00b0010b58f17a6fmr9861192pzb.41.1685618090087; Thu, 01 Jun 2023 04:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685618090; cv=none; d=google.com; s=arc-20160816; b=vSyZtn1VamtO9eiYJP2i6J4/SzHrngI3m00EuY35YPIqInGEzj8xUtKh7rkxQSLwsp Kvsrraa9nay5HsKmWDYstm9c0Pp3RzQCWUojZWWa/65tI/o9oUVHHPqM+MY95hvnUzKM aKo0t6wq/2u3Tc73cPmMMzORgHNv7lapmi+6EZ9TKoCa27SKpsD7IVIj0m0OuQrhbkO3 O21blB7hA+iY3U5QFko/u40RNCGp4rOLdPxEQ/4XwAudqHIqZYZqZDlmQHQABfiHyG7t zt4VdzhOImTxcbYE/lbahXxu8Q0GnWngmzkvfwRYTIel0aOO+4eG8uUJ43N8Wii6ATmE zWBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=Ry0Fg3mRsxTQ7W01Bydyt6HKv/oSBJmXyy/asLm33hA=; b=TJlB6xvtjHlICojc2UgKpiOFd4KAUgHyY67HRDD+HBgA7Z110lVPGMqi4lX2XfUZJs vJXcEx5Hff70R+/o/l2y+xopM0zQJkNc4hQHC5EnpfpRXB08rgZE/XwJ/77Mp646gz7e BOJE9TYoIlDbUptei9g7s0qXf6psIwnwIQcuvX7ovj65wIOiHcqZhElBWFlzMHQ10U1H y9K73jewSS3vVtpHdgjeQg/SfgV0DxTFiRFo77Du78LSZEk2NtwqKbqlEFNR9Fq50yJQ zzuxffATa/DWJIMIpK38NsUXu33MF71OXoreWPfefwXzL3VLwi8I8Sth4/Jz2+07H10a w2ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b004faf33e2755si2579045pgv.349.2023.06.01.04.14.34; Thu, 01 Jun 2023 04:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233113AbjFAKxe (ORCPT + 99 others); Thu, 1 Jun 2023 06:53:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232146AbjFAKxc (ORCPT ); Thu, 1 Jun 2023 06:53:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3D1C8107; Thu, 1 Jun 2023 03:53:31 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3CE902F4; Thu, 1 Jun 2023 03:54:16 -0700 (PDT) Received: from [10.1.26.32] (e122027.cambridge.arm.com [10.1.26.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 185603F7D8; Thu, 1 Jun 2023 03:53:28 -0700 (PDT) Message-ID: Date: Thu, 1 Jun 2023 11:53:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v12 1/1] serial: core: Start managing serial controllers to enable runtime PM Content-Language: en-GB To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Dhruva Gole , =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org References: <20230525113034.46880-1-tony@atomide.com> <20230601104431.GX14287@atomide.com> From: Steven Price In-Reply-To: <20230601104431.GX14287@atomide.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/06/2023 11:44, Tony Lindgren wrote: > Hi, > > * Steven Price [230601 10:04]: >> I haven't studied this change in detail, but I assume the bug is that >> serial_base_port_device_remove() shouldn't be dropping port_mutex. The >> below hack gets my board booting again. > > You're right. I wonder how I managed to miss that.. Care to post a proper > fix for this or do you want me to post it? I'll post a proper fix shortly. Thanks for the confirmation of the fix. >> Thanks, >> >> Steve >> >> Hack fix: >> ----8<---- >> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c >> index 29bd5ede0b25..044e4853341a 100644 >> --- a/drivers/tty/serial/serial_core.c >> +++ b/drivers/tty/serial/serial_core.c >> @@ -3234,8 +3234,7 @@ static void serial_core_remove_one_port(struct uart_driver *drv, >> wait_event(state->remove_wait, !atomic_read(&state->refcount)); >> state->uart_port = NULL; >> mutex_unlock(&port->mutex); >> -out: >> - mutex_unlock(&port_mutex); >> +out:; >> } > > Seems you can remove out here and just do a return earlier instead of goto. Yes, this was just the smallest change. I'll do it properly with an early return in the proper patch. Thanks, Steve > Regards, > > Tony