Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3560668ioa; Tue, 26 Apr 2022 06:07:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw+C5ZK7XPFkZhs1FahThT0tftZzJeDFb0o+QRE7/RVl9RKUFS6FExpcaJ0zpj1Lolt0PM X-Received: by 2002:a05:6402:34c9:b0:423:deb7:f69e with SMTP id w9-20020a05640234c900b00423deb7f69emr24762195edc.335.1650978460745; Tue, 26 Apr 2022 06:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650978460; cv=none; d=google.com; s=arc-20160816; b=rIo0//ypEy1ltySI0u96hIugUC+dXcloTxF7aDXsdFSjHylkKQfDWTzcD0peHmMVGa sEfPyZxSBR+1/rBtcCm1j6tcBgJvufn7ydTrkn10qLzumS1oY6CFPU70nROv9Y8GgUDJ WYQs31dmI1j4XNig8a2e7M/OUR/Owoj97ICN/m/ugHXQbamx6rnk9vdb2iKMaARKD/LS MNnhZskay1NLAQ9ezvkP5oymL5z1mPRvwIVFoGLYqzdUvbsbCGGsq1/V1ICgdFr7yDQE am6cgmK7UzoG3QFLzYHJAmC5tNJsCjHtklF8XeLYCF7dZQjU7JzDtlkCTkeagVxLFaqp +Uvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:sender:hmm_source_type:hmm_attache_num:hmm_source_ip; bh=oM4W/zWuvbehIgIKvIcoZTZCFrqbbiNeFqtIdefkwdE=; b=fhni2N4LgamH6g9K+gy3IclA81mGTg236s+x+3hsj/siQI4N4S3LNFlnYwi8nqwYlw j2s0Jbz8hpECeYuEadegj2JEa9cfi8zoqkTuHnk8OQJnW8eEARUmWSM33z1g19X6BvXj V5BRaxWPHVRftwUwBgCPcRWeJkdCsGXLpy8/RshERnK4y53r5a1WFT37EcqQsCYiQ3qt BSPhLOWSUaemHkIdeVRIajtDbqd3YxgNERzeHgkCyljOwJ/TgoQqBMrKRcZFd9VCxhjm AXVSUdLeNViYh9Lx5KRRSN7u7ZfjlkG7OQVTitZde3s9rm3gngO1PsGdOmrgzMRAjKdE WSqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a50ed0b000000b00425d43b058csi7490892eds.368.2022.04.26.06.07.14; Tue, 26 Apr 2022 06:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243501AbiDZDjU (ORCPT + 99 others); Mon, 25 Apr 2022 23:39:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243191AbiDZDi4 (ORCPT ); Mon, 25 Apr 2022 23:38:56 -0400 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.228]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8738C3A1A1; Mon, 25 Apr 2022 20:35:47 -0700 (PDT) HMM_SOURCE_IP: 172.18.0.188:49938.983364622 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-202.80.192.39 (unknown [172.18.0.188]) by chinatelecom.cn (HERMES) with SMTP id E73A02800EC; Tue, 26 Apr 2022 11:35:44 +0800 (CST) X-189-SAVE-TO-SEND: +liuxp11@chinatelecom.cn Received: from ([172.18.0.188]) by app0023 with ESMTP id 4d512388387547c1946554c70a126d93 for wim@linux-watchdog.org; Tue, 26 Apr 2022 11:35:46 CST X-Transaction-ID: 4d512388387547c1946554c70a126d93 X-Real-From: liuxp11@chinatelecom.cn X-Receive-IP: 172.18.0.188 X-MEDUSA-Status: 0 Sender: liuxp11@chinatelecom.cn From: Liu Xinpeng To: wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Liu Xinpeng Subject: [PATCH v3 3/4] watchdog: wdat_wdg: Stop watchdog when uninstalling module Date: Tue, 26 Apr 2022 11:35:19 +0800 Message-Id: <1650944120-30954-4-git-send-email-liuxp11@chinatelecom.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1650944120-30954-1-git-send-email-liuxp11@chinatelecom.cn> References: <1650944120-30954-1-git-send-email-liuxp11@chinatelecom.cn> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Test shows that wachdog still reboots machine after the module is removed. Use watchdog_stop_on_unregister to stop the watchdog on removing. Signed-off-by: Liu Xinpeng --- drivers/watchdog/wdat_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index 609922ed4744..502da41ac0b2 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c @@ -464,6 +464,7 @@ static int wdat_wdt_probe(struct platform_device *pdev) watchdog_set_nowayout(&wdat->wdd, nowayout); watchdog_stop_on_reboot(&wdat->wdd); + watchdog_stop_on_unregister(&wdat->wdd); return devm_watchdog_register_device(dev, &wdat->wdd); } -- 2.23.0