[PATCH] watchdog: Provide a better stop error message

Prarit Bhargava posted 1 patch 2 years ago
drivers/watchdog/watchdog_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] watchdog: Provide a better stop error message
Posted by Prarit Bhargava 2 years ago
Provide a better stop error message for the case where the watchdog does
not stop.

CC: Wim Van Sebroeck <wim@linux-watchdog.org>
CC: Guenter Roeck <linux@roeck-us.net>
CC: David Arcari <darcari@redhat.com>
CC: linux-watchdog@vger.kernel.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
 drivers/watchdog/watchdog_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 15df74e11a59..f0084bf7c750 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -965,7 +965,8 @@ static int watchdog_release(struct inode *inode, struct file *file)
 
 	/* If the watchdog was not stopped, send a keepalive ping */
 	if (err < 0) {
-		pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id);
+		pr_crit("watchdog%d is still active. Stop by [%s:%d] failed.\n",
+			wdd->id, current->comm, current->pid);
 		watchdog_ping(wdd);
 	}
 
-- 
2.43.0
Re: [PATCH] watchdog: Provide a better stop error message
Posted by Guenter Roeck 2 years ago
On 12/5/23 06:09, Prarit Bhargava wrote:
> Provide a better stop error message for the case where the watchdog does
> not stop.
> 

Please, no such patches. We are busy enough as is, and we don't need
people to change log messages they don't like.

Guenter
Re: [PATCH] watchdog: Provide a better stop error message
Posted by Prarit Bhargava 2 years ago
On 12/5/23 09:32, Guenter Roeck wrote:
> On 12/5/23 06:09, Prarit Bhargava wrote:
>> Provide a better stop error message for the case where the watchdog does
>> not stop.
>>
> 
> Please, no such patches. We are busy enough as is, and we don't need
> people to change log messages they don't like.
> 

It is impossible to tell what actually happened without the additional 
information (specifically the current thread).  That's not a "don't 
like" as much as it is a "provide better debug output".

P.

> Guenter
>