Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2498373pxy; Tue, 3 Aug 2021 07:53:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4/KnzgHIqZsypXI1Ei2LPNCRFC2BgtmGbE7zyPmPRXKnNtPYcroj/8rdT4ymHVb2M7yg7 X-Received: by 2002:a6b:e009:: with SMTP id z9mr129418iog.56.1628002397800; Tue, 03 Aug 2021 07:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628002397; cv=none; d=google.com; s=arc-20160816; b=qsUm3bInqFd/EatOcUnoMhSeOCAn/PRqjMrgghR4PSNwIR+Z44YTyXYotwRgfwbgQ5 dh6x1HKn2juYmyFg4W86sjNVCYUyAiuUz/deMdbhhq2/KBSL+Y1rBU0dNgeObMqxIKgq ralnqA5zmfIevcY5f3yvLWALnnSzUINYEmvLf0EARHmFL93YEgysL85y32DxR6t8QsgO xsGTJU5qUybPtkt+iTsIb9JkIcPKHKdAk6amokovmbWoDLEYW7W0yJcKJGyIMu6nf1D0 mSxs9xAFUkKVkpoA0ZSQVUKONeMcvo+jkton/Y5SzYlA13maGoY7n9SV80zrxYf07Ixa TcAA== 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 :organization:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=1PAUuxbm279noUJYK+2TINkJ8jnjsLCKOAQxIlYn3fU=; b=lnVxr2IzZkPg1qDRMRsZ/Lev6yOIb0ZA1kTPnEbZqgY7Uw84WllqBk44JkpNN/0zNo scBeqSMU40oVzBZtaHnjN09X/JhvLYaXrrB2+ZuI/9lGS3dMfxwMVkKRTk4fyoGKY7NI /Dghp9DL60zfJnE1if87K3BBJZHUC3uz3YclnazEy8XcjZuC5sP8niMjRZ8YDy74hp7g l3Sc6AgjYh+Wy3LlAUN/e3UhBwpKrdfhnF4dte46xaC8vYhOvGFBnXG9aSOukjdKkEcv Uu/UDgnuIEvQh0T/uriyk34qN723Smh5uDbos1Kr+YW+ghy4Mvm/sBgQ5PwFn4ZbJvWl +tLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ik3DDOLN; dkim=neutral (no key) header.i=@suse.de header.b=treT+NlW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h3si16027333ila.128.2021.08.03.07.53.05; Tue, 03 Aug 2021 07:53:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ik3DDOLN; dkim=neutral (no key) header.i=@suse.de header.b=treT+NlW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235641AbhHCOvY (ORCPT + 99 others); Tue, 3 Aug 2021 10:51:24 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:55646 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234206AbhHCOvX (ORCPT ); Tue, 3 Aug 2021 10:51:23 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C3FEA2003E; Tue, 3 Aug 2021 14:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1628002271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PAUuxbm279noUJYK+2TINkJ8jnjsLCKOAQxIlYn3fU=; b=ik3DDOLN3KAwl+H0dQ5f2Dwd9Wvh566q/5UAu7qfixOfdpR1wzexpQMV5k4ei0cDotySWm gdgOg/bqF1L09WxTsYmwnsuyMFpT1zOqfJyrmpza8puJeZYVUD2GmIZZGv5zXp6yX7QINg Vb8q3HA9F4QcdnX8O/6LbLGGC5synVE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1628002271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PAUuxbm279noUJYK+2TINkJ8jnjsLCKOAQxIlYn3fU=; b=treT+NlWqGgfkNZ6sNhbOlQmN03hnRauEeb+lioUxMmm5yIm2Vc7uAOEPM7cc0u+H8cufI MUGTO+DcqFO2rFBg== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 5FCB213B74; Tue, 3 Aug 2021 14:51:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id RN9fFN9XCWGObQAAGKfGzw (envelope-from ); Tue, 03 Aug 2021 14:51:11 +0000 Date: Tue, 3 Aug 2021 16:51:08 +0200 From: Jean Delvare To: linux-watchdog@vger.kernel.org, LKML , stable@vger.kernel.org Cc: Jan Kiszka , Guenter Roeck , Wim Van Sebroeck , Michael Marley Subject: Faulty commit "watchdog: iTCO_wdt: Account for rebooting on second timeout" Message-ID: <20210803165108.4154cd52@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Commit cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout") causes a regression on several systems. Symptoms are: system reboots automatically after a short period of time if watchdog is enabled (by systemd for example). This has been reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213809 Unfortunately this commit was backported to all stable kernel branches (4.14, 4.19, 5.4, 5.10, 5.12 and 5.13). I'm not sure why that is the case, BTW, as there is no Fixes tag and no Cc to stable@vger either. And the fix is not trivial, has apparently not seen enough testing, and addresses a problem that has a known and simple workaround. IMHO it should never have been accepted as a stable patch in the first place. Especially when the previous attempt to fix this issue already ended with a regression and a revert. Anyway... After a glance at the patch, I see what looks like a nice thinko: + if (p->smi_res && + (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN)) The author most certainly meant inl(SMI_EN(p)) (the register's value) and not SMI_EN(p) (the register's address). -- Jean Delvare SUSE L3 Support