lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240819103616.2260006-3-leitao@debian.org>
Date: Mon, 19 Aug 2024 03:36:12 -0700
From: Breno Leitao <leitao@...ian.org>
To: davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com
Cc: netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH net-next v2 2/3] netconsole: pr_err() when netpoll_setup fails

netpoll_setup() can fail in several ways, some of which print an error
message, while others simply return without any message. For example,
__netpoll_setup() returns in a few places without printing anything.

To address this issue, modify the code to print an error message on
netconsole if the target is not enabled. This will help us identify and
troubleshoot netcnsole issues related to netpoll setup failures
more easily.

Signed-off-by: Breno Leitao <leitao@...ian.org>
---
 drivers/net/netconsole.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 72384c1ecc5c..9b5f605fe87a 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -414,8 +414,10 @@ static ssize_t enabled_store(struct config_item *item,
 		netpoll_print_options(&nt->np);
 
 		ret = netpoll_setup(&nt->np);
-		if (ret)
+		if (ret) {
+			pr_err("Not enabling netconsole. Netpoll setup failed\n");
 			goto out_unlock;
+		}
 
 		nt->enabled = true;
 		pr_info("network logging started\n");
-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ