Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1053004rwb; Thu, 10 Nov 2022 10:32:20 -0800 (PST) X-Google-Smtp-Source: AMsMyM58xNCn4rke9N/gzNeFBKn3t7MwvgyBgF51ecbvVehF9RLh+BrLGzG3LXvGMWgdd5JVL2VO X-Received: by 2002:a17:902:ebca:b0:183:d123:e2a7 with SMTP id p10-20020a170902ebca00b00183d123e2a7mr66119075plg.105.1668105140206; Thu, 10 Nov 2022 10:32:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668105140; cv=none; d=google.com; s=arc-20160816; b=MCS/c/y40O9p9R3nnzulUH4ToPBf6Bcf63iOk1EpHq+Vo9NJ34UsE+yZzogw5UfzDm WRKIfcomNvdA8Dbq0hOAjXFEEzA22h4vrUX1Kr8eY83Dr0/AAIE64hU7HEmHFvKQ7aQP 1iX1vG+CpEhm3i7nYNeiJMe8+eETNJ1Xeq12ntcSSYQHjiWLt+uDzLplBjE+gh57EqoQ 6AwP1HKspRVX+V/Hcm5OYsZTDJTfUzdEkecZXgbVz9Ffe30bfHOSklxWwk4J95m6U64f /uSR+Z7Wujf9IN1oFgxt3ubUxCb0FjLQOIo/u11m8z8OkEdi4hBW1pIIf4Z7xHM/D306 a3FA== 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=AWcSmvtAAd5nshpVmK+tjYCHfPfNH63I2RCJ9fpekb0=; b=mL7CiT3FhwDj6bscDtijuLw04J/B1FAoJ1Odyb4mAbx1LWN0a7PCbIknO7eSMhWljO zsjDvnujBMdmYaAsJqTO8CMQaTJpMoMC8qIvc1yCsOU/63CQHjLOWpl8QOAaCBF4vnjj SK45IGykjpfMesq+5XV8vCV3ECnYLd9WGZNhd4BZKE4fsUe+vV3aJd8N/kgGPSZENQPc /NHHb3/tRY74k+F6nuCTy4QJQeSfx/e0R/L1G9rE2/G4emlG+icwHm/yBR9oTsEYHRWs 1AeHwuuCnNm61tIdkKghumv1WBnw8FJRtV9DLJ9+gvshvnNDNsu0Eqmo9RUdp8EHBAQR RKtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pnPpVVew; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b00473c36e3b85si6936289pgp.678.2022.11.10.10.32.06; Thu, 10 Nov 2022 10:32:20 -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=@suse.com header.s=susede1 header.b=pnPpVVew; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231656AbiKJSBi (ORCPT + 93 others); Thu, 10 Nov 2022 13:01:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbiKJSAd (ORCPT ); Thu, 10 Nov 2022 13:00:33 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8150B47314; Thu, 10 Nov 2022 10:00:31 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 324AD1FF97; Thu, 10 Nov 2022 18:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1668103230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AWcSmvtAAd5nshpVmK+tjYCHfPfNH63I2RCJ9fpekb0=; b=pnPpVVewxH0PjRciuCOtuB7hb5Th2mXdC1dbLBfyijTO/9Ag9YMDi0fwiQCbd8TGLh+t6F OOJ9FnNP4GZJwiUoYv9iPblTq37t40B7oMb6i5hms49C1ZBPUBRWJRba7rDctwvdYF7O2A LzXlIrGoNkzOWLAwzSOfl2YEV0pyJWc= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A5F582C142; Thu, 10 Nov 2022 18:00:29 +0000 (UTC) Date: Thu, 10 Nov 2022 19:00:29 +0100 From: Petr Mladek To: John Ogness Cc: Daniel Thompson , 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 36/40] tty: serial: kgdboc: use console_list_lock for list traversal Message-ID: References: <20221107141638.3790965-1-john.ogness@linutronix.de> <20221107141638.3790965-37-john.ogness@linutronix.de> <20221109090631.wbtar2ho45x5yanl@ash.lan> <87tu388nsk.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tu388nsk.fsf@jogness.linutronix.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Wed 2022-11-09 10:50:43, John Ogness wrote: > On 2022-11-09, Daniel Thompson wrote: > >> @@ -463,9 +476,14 @@ static void kgdboc_earlycon_pre_exp_handler(void) > >> * serial drivers might be OK with this, print a warning once per > >> * boot if we detect this case. > >> */ > >> - for_each_console(con) > >> + cookie = console_srcu_read_lock(); > >> + for_each_console_srcu(con) { > >> if (con == kgdboc_earlycon_io_ops.cons) > >> - return; > >> + break; > >> + } > >> + console_srcu_read_unlock(cookie); > >> + if (con) > >> + return; > > > > This change isn't mentioned in the patch description. > > I will move this change into its own separate patch. > > tty: serial: kgdboc: use srcu console list iterator > > Use srcu console list iteration for safe console list traversal. Yes, split it please :-) Anyway, both changes look good to me. Best Regards, Petr