Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2526921pxy; Tue, 3 Aug 2021 08:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpnFgw0X1fyPkSGnyxQ/po+fdUHClka8vj2H3JTpDDGZj7KRSM51HBrIKOy+6nSmK24Fro X-Received: by 2002:a5d:8986:: with SMTP id m6mr3568847iol.87.1628004502125; Tue, 03 Aug 2021 08:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628004502; cv=none; d=google.com; s=arc-20160816; b=JjSTH8KNA4QMqn1UBGOe4beHv9f5rn8Pn6QvI+87Mmqg6EWgu1tRfoo9+5rnRNzhvo zroy1opuMX8aU8f5ag8i3MBZHgTazUKrCBpj1IQmDhI5BtJPwhFusRKR5Y0xQqoR0GMR fBiUxb2E8ZHi3J5Pj8sletGB/vZyo9EKDqyW+9620mg+3NktpEkM+WpvYPU4OVHYjZZW 59gOaotTgVGaJuj11aM5SNi9F3wsybq8k6xoULDq0IV8XfBAv3rTC/9Kdoklz7iwbIbe R8czZh660ZzMAKgLk2cjuIKDe4T7hawaYZhsX83nTqIBi0UCeuD4jG41IYi/HIuaV7b1 6kwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to:sender:dkim-signature; bh=pFZLhwf8uWtcoFg6OfsbtxXzjUjvk0s3pcwcMmfspy0=; b=07ZWYEWBkCKO6YRr9OxDGIdl7w+aWoa2d+Vx+E8omInQ1bPNErb8Y7YP+MVyo/Pf2Z 7Z8oNzIKQv6l9jQeWSgRvN6RL5Fxzkzo6dy+HbIJKKtk97aLvZ2Dwu/eB5GI6gX99o26 Ps39uKvtR0k/z0ltqxb0Vm3vHGCMm732jgZgLl4gLnUnwAqv7UnEfRQopOfz+xapw4Ch q3yv3+eJ43lkC4sLM9ZSu5VEbLYkukQsvct7ALIiDPTs0ebB2cmXya7BCinaI+rEF7nS zYTdb5xmGv74RGfeV0am6CqXXTj2ZqGb58Okv7GwphmO03vsb2jRCbmO8dW8eJw2F26q PgkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ni3iNbIT; 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 y11si19402036ilu.1.2021.08.03.08.28.04; Tue, 03 Aug 2021 08:28:22 -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=@gmail.com header.s=20161025 header.b=ni3iNbIT; 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 S236710AbhHCP12 (ORCPT + 99 others); Tue, 3 Aug 2021 11:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236616AbhHCP11 (ORCPT ); Tue, 3 Aug 2021 11:27:27 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A77C061757; Tue, 3 Aug 2021 08:27:14 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id x15so28528441oic.9; Tue, 03 Aug 2021 08:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pFZLhwf8uWtcoFg6OfsbtxXzjUjvk0s3pcwcMmfspy0=; b=ni3iNbITXEYEyCTXCxrlMZen+f7/t4wpiwd3sXfLn+H4GebKXwRulbPoh5qXFILWcE 1F4J6eS7SDQ4KZFZ2v0V4Dadtc6qFFQJ4BkFhEbbLf/uPgAGLMaBFpsYt8VaJhNVQtoS XY5HviP+PGT8ayMYiarLdzcJVbh4ilO+kIA/EYW4aqH7IBMYkgqCJISMPvakCGN5729N /pF2bqYh2HSVXLurw/12eKdoLq/loO5HeM1BESS3fE+zQBE/btM6qdLZ5SJeWLztHuAX z/obhYGfen9a7Ke9Iej4P0fo6lFXQIgYHjEMggmXUQP4wGvWC5li+12Hy/YVb8T7HKL4 UuWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:cc:references:from:subject:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pFZLhwf8uWtcoFg6OfsbtxXzjUjvk0s3pcwcMmfspy0=; b=ZlgowPs0hNdbEdRhgqCiYvFjllRwdEshV2cBXxTuSMB7WxYf5SVdDC+L4UnUA+N7K7 MZJX3Atv4mUp+Xh8bEr+6STXwmDXRpAPpH2Iqp2zeJX846EjtbTCLDxy3IV8W0v9tv3M lDbiaFdPsOh4NuEMvbzu5h7HWfbEvE+Mc4hAyWWS92BdBJS8Nj4odLvmSjcVEvufL9/d 9ZMD0cn+37uBfM4F7hPzPOgvTH0v7LwPiOWxGDZFvc19pRuyaGcSuZy53z4UmINmLTfY G9aT/Xh2a5ygyS+T1QyKWomuqvLibkSWylQnSgOIAVLHirhmVtDXnj2DdbALjngxAzzU FulQ== X-Gm-Message-State: AOAM531oW7OMoJQYTInicMRIhKn+cHFizVu4RlTfAMKiO4H8iNPNMZeq 1AL+PX3O92elz2SpqgJZptA= X-Received: by 2002:a05:6808:1d6:: with SMTP id x22mr14906323oic.8.1628004434089; Tue, 03 Aug 2021 08:27:14 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j30sm2543937otc.43.2021.08.03.08.27.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Aug 2021 08:27:13 -0700 (PDT) Sender: Guenter Roeck To: Jan Kiszka , Jean Delvare , linux-watchdog@vger.kernel.org, LKML , stable@vger.kernel.org Cc: Wim Van Sebroeck , Michael Marley References: <20210803165108.4154cd52@endymion> <67815219-7226-1a90-4599-5649e9bbc861@siemens.com> From: Guenter Roeck Subject: Re: Faulty commit "watchdog: iTCO_wdt: Account for rebooting on second timeout" Message-ID: <2dae7010-f375-ecbe-c477-0bbd28b92aac@roeck-us.net> Date: Tue, 3 Aug 2021 08:27:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <67815219-7226-1a90-4599-5649e9bbc861@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/3/21 8:01 AM, Jan Kiszka wrote: > On 03.08.21 16:59, Jan Kiszka wrote: >> On 03.08.21 16:51, Jean Delvare wrote: >>> 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). >>> Yes, shame on me that I didn't see that. >> >> https://lkml.org/lkml/2021/7/26/349 >> > > That's for the fix (in line with your analysis). > > I was also wondering if backporting that quickly was needed. Didn't > propose it, though. > I'd suggest to discuss that with Greg and Sasha. Backporting is pretty aggressive nowadays. Guenter