From patchwork Tue Sep 29 16:22:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Jones X-Patchwork-Id: 1373511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=meshplusplus.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ErAIkAay; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=meshplusplus-com.20150623.gappssmtp.com header.i=@meshplusplus-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=qQiwOPB0; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C14Sb33rpz9sSJ for ; Wed, 30 Sep 2020 02:23:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Date:Message-ID:To:Subject:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IQLWlp3mMFQhkPgelUD2Js/CyTWgM1Wz9lDQDl/gvXw=; b=ErAIkAay/uxyXUhPTEqVdyoHbq CBMFOzdp4JXGINMhzEOuoCkdAWFUh2N9YsPV3iEK1OOKJIwlBMUFT3VBcazDFrlJVGU+O1/QuAGNn DES+RRlgluCLP+p8NRol10TUqQhUz1oRfvMxmIGOWiT/uMl0Yhbf5JKDobW/FlhmUKzf+V0UoEsKs KmqkG9FmX3eMQvPpAo4Jd010MPia1yQ6EZWR0rpHGm3oQkmIuApto65TjJ8Tzwo8Lg5qWboBZYi/m OusqPMUe2qvEHCd6iwAd+KBYzPaJ7oKg5mL9NZbMNdKLrSK0C+DtGTdV2GmwJyObkZbD3GtsAxRdH eyZeTgYA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNIOJ-0000tQ-NQ; Tue, 29 Sep 2020 16:22:11 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNIOH-0000sH-6P for openwrt-devel@lists.openwrt.org; Tue, 29 Sep 2020 16:22:10 +0000 Received: by mail-io1-xd42.google.com with SMTP id v8so5411381iom.6 for ; Tue, 29 Sep 2020 09:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meshplusplus-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=apOUnYmu2YyJcMR/R5c32b6+hw2rUcLbKoBkMBZNM38=; b=qQiwOPB0Xf70t21c4M1dgL0q8EoGBcvRpTGiEjums2BKDngofXMaeSXv1J95pjHwre qH8W0KgUzB1zhNEZe/D4DloQWug8u+EQoj1O4CgmBh6lPhxxw/OqqUnonHvpNYiI2BN1 GoVrC2deLoWatYIZp1tGQRYXpl9CmRwvhL6hKc02oOgX3EKCTM08kLHs+TzLg+28+mhS tcctEFRkaOQ6mBURRL8caO/KZuooNkDrkUtF1E6/SlD4Vjopfuwy3XXCs2VzHMSDKGJE iT50QwN1cT/nzS8sEgJB5NYgOwuZxaxijk/9TJC/BOhrA0WQsyUZkGs8OcpfLQ2Xf24v sSfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=apOUnYmu2YyJcMR/R5c32b6+hw2rUcLbKoBkMBZNM38=; b=efoiPK2ytlhqNQVlnh8KxkuHGoyskmcE46ejbjQlrsdb15SOOivE/RJQ/mWy6sx/eL GwzcEApAATrRXTBlJHwXf7cONXKAhuK8y9NZCSaGprn/hwOvz0K6Jv7Gi8xdWuTNe2LU Kxbg8P4iDi7M5Bb1AOXaMA1y2Z7qF1SdHUfpDG0Q7vr1P3Jz7/oftY2Jrni+S4fmv28m M7+eNvjui3fX165kmcA/qmqtAxlUsY+l5qJC7Y1sAfNi0pkhrUzocqiDyWQHQj8EGeet oRhk3GAi4/GFefb/cK4nHiiqiWmuFPIbTJG60oNG4MHDK0w9RgOb2axLdQNopGqj5aYw 4A2w== X-Gm-Message-State: AOAM533mSgXZ8cBoZD4RmcBwGOUsi2q8ZLx5Mm/9QLkXy24NKq0rHMcs SL2qbVb5QImOqgzdFOtYaC5WOc8QuuAPyRVJ X-Google-Smtp-Source: ABdhPJwZo3riX007fPaVSL3NleK2NlkeGiQQXrtcRrNSTvdQAdAW4/i2Lk6tnWjMpR35SycnSiEohg== X-Received: by 2002:a6b:8fc9:: with SMTP id r192mr3114755iod.24.1601396526935; Tue, 29 Sep 2020 09:22:06 -0700 (PDT) Received: from ?IPv6:2601:248:4200:25a::71? ([2601:248:4200:25a::71]) by smtp.gmail.com with ESMTPSA id l5sm2575207ilj.70.2020.09.29.09.22.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 09:22:06 -0700 (PDT) From: Michael Jones Subject: [PATCH 3/5] initd: Ensure that watchdog frequency changes apply right away To: openwrt-devel@lists.openwrt.org Message-ID: <33a0253a-1bd6-d223-2cd6-1e92ed8a4ccc@meshplusplus.com> Date: Tue, 29 Sep 2020 11:22:04 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_122209_301490_961016C7 X-CRM114-Status: GOOD ( 12.99 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:d42 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org If the watchdog frequency is changed from high to low, the watchdog won't be tickled again until the previous period has expired, which may result in a watchdog timeout. This change ensures that the new frequency is applied immediately. Signed-off-by: Michael Jones ---  watchdog.c | 1 +  1 file changed, 1 insertion(+) diff --git a/watchdog.c b/watchdog.c index 20b6e20..20830c3 100644 --- a/watchdog.c +++ b/watchdog.c @@ -140,6 +140,7 @@ int watchdog_frequency(int frequency)      if (frequency) {          DEBUG(4, "Set watchdog frequency: %ds\n", frequency);          wdt_frequency = frequency; +        watchdog_timeout_cb(&wdt_timeout);      }        return wdt_frequency;