From patchwork Tue Dec 5 14:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prarit Bhargava X-Patchwork-Id: 174060 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3454388vqy; Tue, 5 Dec 2023 06:11:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTlAmAOq6NbEKqk59OTxEFU/fNsMYS0xsEIKz9fi4FGV1ZtITyJHmpdCLu4b/9c0VlnlRU X-Received: by 2002:a17:902:6947:b0:1d0:6ffd:ae17 with SMTP id k7-20020a170902694700b001d06ffdae17mr2581235plt.126.1701785462783; Tue, 05 Dec 2023 06:11:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701785462; cv=none; d=google.com; s=arc-20160816; b=blIb3sB/qLb8FDBIT5BxbCXLL0AVy1Yp2MABvrndzx/CBPeKvtxEq8IokgEQPXq5fR VksEr9ZF9baOHXYdmTkz8MMfR/HglxaNppRytevSwTTcnf/5DMgB7fbrq3qd8TojXOIa bEH8mJPM3E1vXLGvoTwcEydXgeqbm8zjfUvFnvxc7srI8NNSICSwRDHh64XcKnnn15Vs REDR+frlBmSONAwaozniSvhs403LIf+KmsU/hGIcTc71rG/DjCQPVFIgdWAWWhauWEXl QLz4yFLeI7AqLSFxqMxQX7yeACwstuXCHK6ozLqT+PW16fgmtjUQ50Ms0LpxSoTsjmuz ICoA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=zjpDU1pO5fL8Z2EU79m8w3lIjmII9ANV1M3MyIbt0ME=; fh=7mQ4at8w+MKMhGbbwal2sGJJhWSMjmSyjSO43KuoigM=; b=d0nkrgsOW1WWLmhZu1PlWwwCrQj7XH6uhQUH6/ssJKGWaTa/AFKtxyfv4OfeBJxGvA 7HPSM6iQR4/XJnkP6f8vcKEqlGVuFnTbHlIpZg4/4g8y81EYKjEjl43x6WPFlu95O9ho qe7QymtAcP67QjDLjdUJtHo/JOo1JHhbCblSVQgzZWDr4SReVAyH+rr0z+PDnqtiRq2l Y0WHrNpFUZtpPKCG8NmKd5mdk28YpV3q02Jzmddu1Ss6ZphwOQozMen43vHfA4kh6c3n hqFv1tzjtDAm+sX0nfjub+dYZ6IdX6TLpQ9sKNzJ5iEJFxIY6k2oQsXk18BcXjHoUJsq ak3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AXzplE61; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id y10-20020a170902864a00b001cfa70f3a2asi9266713plt.245.2023.12.05.06.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:11:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AXzplE61; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 42F358085F9C; Tue, 5 Dec 2023 06:10:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345629AbjLEOKR (ORCPT + 99 others); Tue, 5 Dec 2023 09:10:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345587AbjLEOKQ (ORCPT ); Tue, 5 Dec 2023 09:10:16 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BDFDB9 for ; Tue, 5 Dec 2023 06:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701785421; 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; bh=zjpDU1pO5fL8Z2EU79m8w3lIjmII9ANV1M3MyIbt0ME=; b=AXzplE61wm0wc8yNrlCbxbSpHbVLySxPi78iZKby+0WCo0ihllR/JlQ/2jqtZHDqgv2ys8 heOvMEWC9tuTuaLKP5p6HK235MeLrAn/MX144leLPJjSb+F0KcVLIvWDhqCPxSKtztfo23 Lgyn3x78pvHOseVM2mqEMw4y4fLdMkE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-246-hAEfsowROliopZ5AVRFZjQ-1; Tue, 05 Dec 2023 09:09:30 -0500 X-MC-Unique: hAEfsowROliopZ5AVRFZjQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A21B1C06915; Tue, 5 Dec 2023 14:09:30 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit2023-praritguest.khw1.lab.eng.bos.redhat.com [10.16.200.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED5A22026F95; Tue, 5 Dec 2023 14:09:29 +0000 (UTC) From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Wim Van Sebroeck , Guenter Roeck , David Arcari , linux-watchdog@vger.kernel.org Subject: [PATCH] watchdog: Provide a better stop error message Date: Tue, 5 Dec 2023 09:09:16 -0500 Message-ID: <20231205140926.397956-1-prarit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 06:10:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784451393380409491 X-GMAIL-MSGID: 1784451393380409491 Provide a better stop error message for the case where the watchdog does not stop. CC: Wim Van Sebroeck CC: Guenter Roeck CC: David Arcari CC: linux-watchdog@vger.kernel.org Signed-off-by: Prarit Bhargava --- 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); }