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 66E2CC4332F for ; Thu, 10 Nov 2022 18:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbiKJSBj (ORCPT ); Thu, 10 Nov 2022 13:01:39 -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> 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