Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1128254rwb; Tue, 27 Sep 2022 08:46:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lg377LCN8V/8zXN8GmYQGcE9j3b48Y5GJaPY7w3Pepiafysuj1BCaGHpldC52SrbslVvK X-Received: by 2002:a17:903:244e:b0:178:4f50:1ca0 with SMTP id l14-20020a170903244e00b001784f501ca0mr27723012pls.104.1664293600169; Tue, 27 Sep 2022 08:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664293600; cv=none; d=google.com; s=arc-20160816; b=coWY2cDL19EMIVRKXzL9Bm3jyCNv7r+M1t+8zmc+YEeynOQtQAKCjv9F1v9Va7bYFy gIPiu1RxKtqFxTMZed86c7JEmbPNU67G8z9mdsd8bujy63fYgl/l8/1goCWtzUAOlUWh c14R3JMXKS9Ykb8EgZ4sn21S+Cf3OB4Hq1zx8NjPt8z//DDL+OTk+n3k3iHCZSjf3soY x6EoEuYeC7muAqgYuDL6GM5shvCBqEt1hOhuoLlXU5izeFFfjeOJCTSRlhOOphjHhPFh M6eFoLQBmZqVA2thZOqhXt7SaLijW9Cy23sUnHQfodZhD3XSYsP/2m7UVQ2fryM0gNCX 8CVw== 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=P9H9FuxWTVZeaYAprCOlqzp8J1vVr73QDuMTqkuhcOk=; b=MsjCWoRZSPAgKCYNnJMa5ZoevadWajpKOsOjH8u/zyzvARbYo4K7mfXRSCgxdyReVT Y8vWmkZ6rLp/dDYyUXSnZdNheyVjZKYWNiVe7E5RIQWclL39YUwcUzQBXN7SbLbzOsm2 P54ve2vf2Jpi99RAvUgdmQ+OtlvQc0b1rg0I4lsGL5KTlKSfLZSUt/mwqr7OewqykVrH C2s9/zySQOfOSq/JRF2tLvcpHXbqyQPixg5xLV3OZ9D0qFaZJAy+jd+ZGBMJ+TAW76bD rK3FrMOaKoKHfRN09aJYpSRE5pa9/H0phLNeYVKlmnZL6nB1eqdFnfh0N9pZ85BhWmfv DIkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gy8gZezK; 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 h22-20020a17090a055600b001fdc6f18ceasi14952752pjf.22.2022.09.27.08.46.27; Tue, 27 Sep 2022 08:46:40 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=gy8gZezK; 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 S230517AbiI0PTa (ORCPT + 99 others); Tue, 27 Sep 2022 11:19:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiI0PT1 (ORCPT ); Tue, 27 Sep 2022 11:19:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2199A1432B9 for ; Tue, 27 Sep 2022 08:19:27 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id AEC2C1F891; Tue, 27 Sep 2022 15:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664291965; 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=P9H9FuxWTVZeaYAprCOlqzp8J1vVr73QDuMTqkuhcOk=; b=gy8gZezK29Bc7BAGDAS3J70kAMK63Xiv+kq+9OzOd3fWp29fbweFnDys8/6HmcwOp1e6hP 1EFiKFMPX9p5N+UI53pjMOi+hBDnxC38pOHQ7xB84Me1jdHCl2RB3Uqlnx+KRbi/mMslOz Oa+E8qSMjiNUAevwOysHe1wlA1NDiw0= Received: from suse.cz (unknown [10.100.201.202]) (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 4281C2C16B; Tue, 27 Sep 2022 15:19:24 +0000 (UTC) Date: Tue, 27 Sep 2022 17:19:23 +0200 From: Petr Mladek To: Thomas Gleixner Cc: LKML , John Ogness , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Peter Zijlstra , "Paul E. McKenney" , Daniel Vetter , Greg Kroah-Hartman , Helge Deller , Jason Wessel , Daniel Thompson Subject: Re: [patch RFC 06/29] printk: Protect [un]register_console() with a mutex Message-ID: References: <20220910221947.171557773@linutronix.de> <20220910222300.712668210@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue 2022-09-27 11:56:30, Petr Mladek wrote: > On Sun 2022-09-11 00:27:41, Thomas Gleixner wrote: > > Unprotected list walks are a brilliant idea. Especially in the context of > > hotpluggable consoles. > > Yeah, it is crazy. And it is there probably since the beginning. > > > @@ -3107,13 +3143,14 @@ void register_console(struct console *ne > > bool realcon_enabled = false; > > int err; > > > > - for_each_console(con) { > > + console_list_lock(); > > Hmm, the new mutex is really nasty. It has very strange semantic. > It makes the locking even more complicated. Please, continue the discussion in the reply to the v1 patchset, see https://lore.kernel.org/r/YzMT27FVllY3u05k@alley I send it to this RFC by mistake. I am sorry for the mess. Best Regards, Petr