Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754788AbcCRLFr (ORCPT ); Fri, 18 Mar 2016 07:05:47 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:56208 "EHLO mx4-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbcCRLFj (ORCPT ); Fri, 18 Mar 2016 07:05:39 -0400 Date: Fri, 18 Mar 2016 07:05:35 -0400 (EDT) From: Ulrich Obergfell To: Josh Hunt Cc: Don Zickus , akpm@linux-foundation.org, linux-kernel@vger.kernel.org Message-ID: <563568565.32369885.1458299135682.JavaMail.zimbra@redhat.com> In-Reply-To: <56EAD663.8080709@akamai.com> References: <1457826627-21727-1-git-send-email-johunt@akamai.com> <20160314143426.GK194535@redhat.com> <56E6CE86.5070606@akamai.com> <20160314162955.GQ194535@redhat.com> <56E78957.6020707@akamai.com> <1338048031.31356204.1458120082361.JavaMail.zimbra@redhat.com> <56EAD663.8080709@akamai.com> Subject: Re: [PATCH] watchdog: don't run proc_watchdog_update if new value is same as old MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.36.6.170] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF45 (Linux)/8.0.6_GA_5922) Thread-Topic: watchdog: don't run proc_watchdog_update if new value is same as old Thread-Index: nj8djNzaPb8l/aPWPGl5Ph/SrXtoyQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1984 Lines: 56 Josh, in https://lkml.org/lkml/2016/3/15/1 you stated that the soft lockup messages do not occur with kernel v4.5. Hence, I believe this should not be reproducible with kernel v4.4 either. The relevant changes in update_watchdog_all_cpus() were introduced in kernel v4.3 by patches that I mentioned in my previous reply. I see that watchdog: use park/unpark functions in update_watchdog_all_cpus() and related patches are included in this change log https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/kernel/watchdog.c?id=refs/tags/v4.4.6 In terms of kernel v4.1, it seems that the issue is mitigated by the access rights of the watchdog parameters in /proc/sys/kernel as only a privileged user should be able to write to, for example /proc/sys/kernel/nmi_watchdog Also, based on the analysis in my previous reply, I think these soft lockup messages are 'false positives' as the repeated cancel/restart of watchdog_timer_fn() prevents the 'watchdog/N' thread from running (i.e. I think the thread is not prevented from running by something actually hogging CPU N). Regards, Uli ----- Original Message ----- From: "Josh Hunt" To: "Ulrich Obergfell" Cc: "Don Zickus" , akpm@linux-foundation.org, linux-kernel@vger.kernel.org Sent: Thursday, March 17, 2016 5:08:03 PM Subject: Re: [PATCH] watchdog: don't run proc_watchdog_update if new value is same as old [...] As you mention my patch will mask this problem for 4.1 which is why I wanted to get it into stable. Do you think there is any way to mitigate this issue for the stable kernels (4.1 to 4.4) if the user changes the values doing something like: foo=1; while :; do echo $foo > /proc/sys/kernel/nmi_watchdog; foo=$(( ! $foo )); sleep .1; done & sleep 30 && kill %1 ? I realize this isn't a real-world use-case (I hope :)), but shows there is still a way to cause the box to soft lockup with this code path. [...]