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]
Date:   Tue, 16 Apr 2019 14:20:46 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Wolfram Sang <wsa@...-dreams.de>
Cc:     Jerry Hoemann <jerry.hoemann@....com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        linux-watchdog@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 06/16] watchdog: hpwdt: drop warning after calling
 watchdog_init_timeout

On Tue, Apr 16, 2019 at 10:55:33PM +0200, Wolfram Sang wrote:
> 
> > That is indeed a problem: the pointer will be NULL if there is no parent
> > device (such as in softdog.c). Otherwise it should never be NULL.
> 
> Okay, this spoils my err_dev solution. So, we probably go this route
> then:
> 
> 	pr_<errlvl>("watchdog%d: <err_msg>\n", wdd->id);
> 

I don't like it because it doesn't show the driver name, and watchdog%d
can change with each reboot. How about something like this ?

static void pr_wdt_err(struct watchdog_device *wdd, char *text, int err)
{
	if (wdd->parent)
		dev_err(wdd->parent, "%s: %d\n", text, err);
	else
		pr_err("%s: %s: %d\n", wdd->info->identity, text, err);
}

We could then use the same mechanism to generate error messages for
watchdog_register_device().

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ