Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp843798rwb; Thu, 10 Nov 2022 08:04:46 -0800 (PST) X-Google-Smtp-Source: AMsMyM52DuB6s3XCkjN8az8WvaTbc6460kcLeaDEMPTyrNxhCumHCWVFicReWiTUjq81b4lG4zC2 X-Received: by 2002:a05:6402:b34:b0:461:a7e0:4684 with SMTP id bo20-20020a0564020b3400b00461a7e04684mr2606258edb.267.1668096286523; Thu, 10 Nov 2022 08:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668096286; cv=none; d=google.com; s=arc-20160816; b=v+/iiw+rpWcwRxIo4+ugpaRzZQvYb4tkoYB6mIjgBLKMoHGe52quT1hATVN6MDtOlX eMS8MRtkt7EwOlRY7fR1e96d2NSHjZwlMmXRMX3CFq6RBxQdAC0fa3uMsPYswrhW+IV/ UvCIvz004oGeInzP01roXCPFnxtm8uZcqrAsksOXy5FfCyz2rLBxlb7/gaL0Dgiz3pU9 XT5h458HMRLzGu9Mpu+D2Op9/1m0RkDq5S2YSO8iSKn6S447Ym1ZRBRi0QO0JR60clza CF0mEX9xiX38wBilZvbIWLwFNnn6w+w2xkNHoGbYE18RtswHwbg3orFHDYEnRmxFkuR3 8HsA== 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=EsQlpkhdgjoA/X5gtb5fhKMeMkf7Cp+/JUdRA+xD300=; b=fxfTVj5FWMav7UfkA5hRRclXK+OQZFiIyncw0zPyqfyv1ebEDiUpqcXq8BYjdH/E4g ZWz6vHJRRdmfVaxpEvvXZVEkyjEeIi+NNsVJXET5ZGjr0iaDWyYBM0fwqSw3MbeDQJkq ioCT9ZAaCo8ETvw0A9PDX3Ai47OzPuprwz0FW3sMInn8SdWBreDpAi9Z8tpqEZFBe2F8 KlvwM5IDfONigVcqnLZRZYQh0XFuGtUkGjujbtuwad9Bhl5uLGS3jQBwC2fo11hgIuZm mFAzFISnkudHr8tDpSJ0RFtSN5TJWx9dUJpUfeiv5YemskGw3j3hetPs+pZQN2nEQq7A UOFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AWBQ/Lk+"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a1709060f4c00b0073da0ce043csi14348885ejj.619.2022.11.10.08.04.20; Thu, 10 Nov 2022 08:04:46 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b="AWBQ/Lk+"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230522AbiKJPOK (ORCPT + 92 others); Thu, 10 Nov 2022 10:14:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbiKJPOH (ORCPT ); Thu, 10 Nov 2022 10:14:07 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9DCC1FCF3 for ; Thu, 10 Nov 2022 07:14:03 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id u24so3509631edd.13 for ; Thu, 10 Nov 2022 07:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=EsQlpkhdgjoA/X5gtb5fhKMeMkf7Cp+/JUdRA+xD300=; b=AWBQ/Lk+9Z0VtGMU2ft5p9+bz1v7t1R8/QgNao+rXcWJUGcYB0Ov5ugk36ejJ9Ku7/ Cw8U4yhp2ByRxc6McLCHK/TZixljABaUxNoKLgPVsHeZEnNbhs9mSW60ZV8j5djhB5Gm n1v6lqQaaxRdOXZdaU31DJKACREv+RJf7A/6mgM1ckeOH59NgAUQq161I5WiCStnl+wa JgWJNOHHprQvQ44WcNBOoeMj83wOLPkYyxAgu0LWbsQ6z8SMkH6BMj/UNMAXJ7+KuZXP bNKGkxSvT25Vt0M7CgrTP59V4UCo2DY0CX1D8F9MyPUmuoQ4+4thq8flUYtKNZXGlXJt yPxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EsQlpkhdgjoA/X5gtb5fhKMeMkf7Cp+/JUdRA+xD300=; b=2cPy9La2K4lEpNorxKlz+Zj8GmkQm3TNLn+Mecmt9jnWG6WHtIvwvJfO1Z5y97bPB1 /+fpzAsKf7fF+/Mfab9gHGp/4n3j1sa0GtkcyyX0A2vBdgQEv5T3fw57Gd1eQwtHTj/g Bs9LgFZeu2s8d0jHxJ29msSe7xB/CC/W/iHjtWvRRmNCMYBjBkRYv9R8xwCceSkoab6C meID2Mwy8zyQDseUVSS9x3eipqz9vrzEBITqkaXPvtFfCGcJ7y/mWCvVIYKPZZNxWCHN TDFAcih5URUuefNcet3kpXctWfrQRBD7iSl2y9N47qFeRASb6C7uizA0aPU64ZNrKw4O rX5g== X-Gm-Message-State: ACrzQf01DNdX5zbfRsL5XFN0HXv87fggeRI95aUZYkqWKEfvgJddi0f8 XEJsnMhQMEF/JSmDjZ8MftzeDQ== X-Received: by 2002:aa7:c612:0:b0:461:2915:e41d with SMTP id h18-20020aa7c612000000b004612915e41dmr2405122edq.184.1668093242341; Thu, 10 Nov 2022 07:14:02 -0800 (PST) Received: from frostfish ([82.132.184.39]) by smtp.gmail.com with ESMTPSA id n15-20020aa7db4f000000b00456d2721d93sm8460868edt.64.2022.11.10.07.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 07:14:01 -0800 (PST) Date: Thu, 10 Nov 2022 15:13:56 +0000 From: Daniel Thompson To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Jason Wessel , Douglas Anderson , Greg Kroah-Hartman , Jiri Slaby , kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org Subject: Re: [PATCH printk v3 37/40] tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console() Message-ID: References: <20221107141638.3790965-1-john.ogness@linutronix.de> <20221107141638.3790965-38-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107141638.3790965-38-john.ogness@linutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Mon, Nov 07, 2022 at 03:22:35PM +0106, John Ogness wrote: > Calling tty_find_polling_driver() can lead to uart_set_options() being > called (via the poll_init() callback of tty_operations) to configure the > uart. But uart_set_options() can also be called by register_console() > (via the setup() callback of console). > > Take the console_list_lock to synchronize against register_console() and > also use it for console list traversal. This also ensures the console list > cannot change until the polling console has been chosen. > > Signed-off-by: John Ogness Reviewed-by: Daniel Thompson Daniel.