Message ID | 20230710134524.25232-2-john.ogness@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp5043435vqx; Mon, 10 Jul 2023 06:58:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFYl/QUf6mC856BUaqZwIg/wjTAXVEsE8TJJ0uQNSyKFngqtItLISoi0xJbgV/j0EItRab/ X-Received: by 2002:a05:6a00:1709:b0:67c:5c21:b430 with SMTP id h9-20020a056a00170900b0067c5c21b430mr17200561pfc.33.1688997527977; Mon, 10 Jul 2023 06:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688997527; cv=none; d=google.com; s=arc-20160816; b=H+xQPq5OCYh7tRfzmxXOiWxZ7k7Ll3P/cvfX4Eutygg9ot+Cu9mp0lCIxjKw2GH3cU HR25AyQ3Yl9SRwbyV7PY4msKl9ueXJBGK0mwj7O+1KxoLf+x2PcqC2qEArX7KBRikenF ZIdrhDZUbjqn0zz/+AYvihF0uPhUqrx6KtyPuUNjWJkezPsMli2LGqj5ZBklSkC5KkWE VjiMSCx4LKq8gbD5nTUG1ZzbsgMiIDowpqzdTmzuojSyOYRU5fniYVvfs7aOZ8bTddBS dkgkQjeug2E7KshSQGXmhBLOkB1p9c+P4BayWwoCuIxs2T1lgIn/11OkTXVbcVEF2eCz 9/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=B9NLpZDV0rDJscklMexuqubYAOrVOVFP5G0SfhKaC40=; fh=snfNmeYpwN2wMIrLpkrEvSNSjBz+ljiy3c1UurUR8io=; b=ZRnUAzM4yHZ0rmyGAplQR7JiiP4RiVWXOCPzHX1MNoFiXKZ+/9Ru82FI0P7ejfhKKJ LTkGvWsdk/jQ86J4h5c1lU3dJpKtXp1Kmzck75Z1xIA0x33QIW5v8rry7HxiYv5Sw3XJ /mGXlYXdtAtEMP0+SAMuGOLaiYX3sc2ds/ZWnvgNJO7gFjalI5PB5cuc6hzpnYn2nTcB 655pp52H+2///NZtNR5wvSwfI2tiqox9h5bUWDczrOnuLWl29rCpkbDNQTdNuQgn3Jci srRl9NCHDk17gb1SPAHlywDmbKe0t0mCNYzQzSblVNpfVdvurqiM1ykYvjSz70pqDhCx /wVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=mPH34seK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=MimllhSt; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h22-20020a056a00231600b0067f9d269213si9219081pfh.171.2023.07.10.06.58.34; Mon, 10 Jul 2023 06:58:47 -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=@linutronix.de header.s=2020 header.b=mPH34seK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=MimllhSt; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232991AbjGJNpf (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Mon, 10 Jul 2023 09:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbjGJNpb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 10 Jul 2023 09:45:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E31FB for <linux-kernel@vger.kernel.org>; Mon, 10 Jul 2023 06:45:29 -0700 (PDT) From: John Ogness <john.ogness@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1688996727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B9NLpZDV0rDJscklMexuqubYAOrVOVFP5G0SfhKaC40=; b=mPH34seK6EKd96789117404thhQ8iF13OLpNr8Rr4KlkQwNJABW99gTYK+7HnIjltRHnN+ 2yJBLZcArEG9Xrwkd0d3MiWAydDpHP2tGyam99KieBiEmInY5CgsIn9vHkwsUk48Ee7eTR zNXJ3sN2/CVr6hYmUfI8t+JcrOZTuJDijmKzFRqMq5CrrEl6NacvXqO8OgPDyAx+LvFEt1 ubf3eSzQxZ1WFEW5moucTAYNP/I+xcORGxd3pkhprECltFA9rFynae9SUdxlVFYQRNtgXP 7eZX3/eMHsZSZlnvQUf8ctTN32aOL3r+d9aTnkOWLj0gjRn2yIF/TpORQgS1FA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1688996727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B9NLpZDV0rDJscklMexuqubYAOrVOVFP5G0SfhKaC40=; b=MimllhStnyB8UVIm3i7qxoahyZlF7eOmcJSKU+Xf2Frp7wMCiRdG+vr3tcFXyKXVdnFhAQ reR+NH86j4GeIbDw== To: Petr Mladek <pmladek@suse.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>, Steven Rostedt <rostedt@goodmis.org>, Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org, Jason Wessel <jason.wessel@windriver.com>, Daniel Thompson <daniel.thompson@linaro.org>, Douglas Anderson <dianders@chromium.org>, Aaron Tomlin <atomlin@atomlin.com>, kgdb-bugreport@lists.sourceforge.net Subject: [PATCH printk v2 1/5] kdb: do not assume write() callback available Date: Mon, 10 Jul 2023 15:51:20 +0206 Message-Id: <20230710134524.25232-2-john.ogness@linutronix.de> In-Reply-To: <20230710134524.25232-1-john.ogness@linutronix.de> References: <20230710134524.25232-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771042271775428271 X-GMAIL-MSGID: 1771042271775428271 |
Series |
various cleanups
|
|
Commit Message
John Ogness
July 10, 2023, 1:45 p.m. UTC
It is allowed for consoles to provide no write() callback. For example ttynull does this. Check if a write() callback is available before using it. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> --- kernel/debug/kdb/kdb_io.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
On (23/07/10 15:51), John Ogness wrote: > It is allowed for consoles to provide no write() callback. For > example ttynull does this. > > Check if a write() callback is available before using it. > > Signed-off-by: John Ogness <john.ogness@linutronix.de> > Reviewed-by: Petr Mladek <pmladek@suse.com> > Reviewed-by: Douglas Anderson <dianders@chromium.org> > Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
On Mon, Jul 10, 2023 at 03:51:20PM +0206, John Ogness wrote: > It is allowed for consoles to provide no write() callback. For > example ttynull does this. > > Check if a write() callback is available before using it. > > Signed-off-by: John Ogness <john.ogness@linutronix.de> > Reviewed-by: Petr Mladek <pmladek@suse.com> > Reviewed-by: Douglas Anderson <dianders@chromium.org> > Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> For v1 I shared an ack rather than queuing the patch. Although reading the thread back it is possible that was based on a misunderstanding (https://lore.kernel.org/lkml/20230309113020.GA78621@aspen.lan/ ). Anyhow, it looks like you have designed the new series to be picked individually? Daniel.
On 2023-07-11, Daniel Thompson <daniel.thompson@linaro.org> wrote: > For v1 I shared an ack rather than queuing the patch. Although reading > the thread back it is possible that was based on a misunderstanding > (https://lore.kernel.org/lkml/20230309113020.GA78621@aspen.lan/ ). > > Anyhow, it looks like you have designed the new series to be picked > individually? I understood that Petr will carry the patch. Yes, this series only includes the non-atomic/non-threaded cleanups so that it will be easier for Petr to send the full series off to linux-next. For this patch there is nothing left to do. I should have removed the kdb people/lists from the mailing. Sorry about that. John Ogness
On Tue, Jul 11, 2023 at 11:04:11AM +0206, John Ogness wrote: > On 2023-07-11, Daniel Thompson <daniel.thompson@linaro.org> wrote: > > For v1 I shared an ack rather than queuing the patch. Although reading > > the thread back it is possible that was based on a misunderstanding > > (https://lore.kernel.org/lkml/20230309113020.GA78621@aspen.lan/ ). > > > > Anyhow, it looks like you have designed the new series to be picked > > individually? > > I understood that Petr will carry the patch. Yes, this series only > includes the non-atomic/non-threaded cleanups so that it will be easier > for Petr to send the full series off to linux-next. No worries, that's fine for me and from my point-of-view its still: Acked-by: Daniel Thompson <daniel.thompson@linaro.org> > For this patch there is nothing left to do. I should have removed the > kdb people/lists from the mailing. Sorry about that. To be honest I'd rather be in the loop than out (and with that title my mail filters would jump in it anyway). Daniel.
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c index 5c7e9ba7cd6b..e9139dfc1f0a 100644 --- a/kernel/debug/kdb/kdb_io.c +++ b/kernel/debug/kdb/kdb_io.c @@ -576,6 +576,8 @@ static void kdb_msg_write(const char *msg, int msg_len) continue; if (c == dbg_io_ops->cons) continue; + if (!c->write) + continue; /* * Set oops_in_progress to encourage the console drivers to * disregard their internal spin locks: in the current calling