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-next>] [day] [month] [year] [list]
Message-ID: <09237774d7a64521888fdd47f4ac5d8e@huawei.com>
Date: Mon, 27 Jan 2025 09:35:46 +0000
From: "liuchao (CR)" <liuchao173@...wei.com>
To: Guenter Roeck <linux@...ck-us.net>, "wim@...ux-watchdog.org"
	<wim@...ux-watchdog.org>, "linux-watchdog@...r.kernel.org"
	<linux-watchdog@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: caihe <caihe@...wei.com>, lixiaokeng <lixiaokeng@...wei.com>
Subject: RE: RE: [PATCH] watchdog: only print critical log when the watchdog
 fails to be stopped

On 1/26/25 21:10, Guenter Roeck wrote:
> On 1/26/25 00:38, Liu Chao wrote:
> > Every time the user echoes 0 > /dev/watchdog0, meaningless critical
> > log is printed.
> >
> 
> It is not meaningless, and it will still be displayed after this change, making the
> change pointless.

The change is not pointless. For example, the softdog driver does not invoke 
watchdog_stop or print logs in the watchdog_release.

Liu Chao

> 
> Guenter
> 
> > Signed-off-by: Liu Chao <liuchao173@...wei.com>
> > ---
> >   drivers/watchdog/watchdog_dev.c | 9 +++++----
> >   1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/watchdog/watchdog_dev.c
> > b/drivers/watchdog/watchdog_dev.c index e2bd266b1b5b..0a9d5e6f3a88
> > 100644
> > --- a/drivers/watchdog/watchdog_dev.c
> > +++ b/drivers/watchdog/watchdog_dev.c
> > @@ -960,14 +960,15 @@ static int watchdog_release(struct inode *inode,
> struct file *file)
> >   	if (!watchdog_active(wdd))
> >   		err = 0;
> >   	else if (test_and_clear_bit(_WDOG_ALLOW_RELEASE,
> &wd_data->status) ||
> > -		 !(wdd->info->options & WDIOF_MAGICCLOSE))
> > +		 !(wdd->info->options & WDIOF_MAGICCLOSE)) {
> >   		err = watchdog_stop(wdd);
> > +		if (err < 0)
> > +			pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id);
> > +	}
> >
> >   	/* If the watchdog was not stopped, send a keepalive ping */
> > -	if (err < 0) {
> > -		pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id);
> > +	if (err < 0)
> >   		watchdog_ping(wdd);
> > -	}
> >
> >   	watchdog_update_worker(wdd);
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ