Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7654884yba; Thu, 2 May 2019 13:49:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhTIAaBEtK9RclICmHTyI8PEnCsDaRTGO3Z51IovFFzGVLk9nwzkEGotLm0WYv3HS5cOMW X-Received: by 2002:a17:902:2bca:: with SMTP id l68mr5673769plb.301.1556830179846; Thu, 02 May 2019 13:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556830179; cv=none; d=google.com; s=arc-20160816; b=fPRd7Cja7xBitHMt7/hdxUTMWBSL4ecf7LVmMjXsBrpBscRK0XRek3IsLb2nZgyHkw Bc3kgk6dl5LxW5uqyBJ0fo7ibFpOM4AnCX2/vVeYtJC+XvO7yh9GAAA9JWqX8zAg4h88 L1+BRHrrBuUn6FAUKAjUlk2Nd90sTVuj6MT9fKRfh5iLxw1Wf6/W6l3gLwjeOw08NNHY jO3AHc02sfvclxSs4A4V5vMM72tdWRyxhPeU/jEFRCUU0uhLamFRK1zyUDf/JPiu5PiK jENhQFN+e27KsSVdFKGzAz9OYb6ULp8rexk3eSQQgJdH1fBK8FU2EIckYL7UmQZfuqZj 56gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p0rauU0ja3fR+oPmh7A/vlojiO16XNZbGFS9RST2+60=; b=bYLMwdqxu7OQ8+XhuMNtEv9AI1BY5vD+RcF1JCruesW6E6cEDIJrEWEGDsGEsotCY+ 9aALe3+hvJcCvdj4/8J0noQu1mD0Mb+qcuIlKJKI3LLrh+n7biHRyeoj5c92TGm9SRwf gD37d1XiHE86SlgOdDGWGyxkx+MiKkBDF0NrE3BhOhXP8pLiAWvb73myk1DeI7nFxDzl jzW1jInbdhBWTdnzz5Z//AzJ8eJJmiBVBL1I6B3t3QTDozs6w0gCpPKv6hr9VbC0a7Ix Av2joovG/QhSmXdyQ+bKZVm47VlF+t3ztkX9hVs8qVqHFF2ANBCcRpu6wH+IQQaqxzOr RyDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Utp9CJUE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z184si61174pgb.355.2019.05.02.13.49.24; Thu, 02 May 2019 13:49:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Utp9CJUE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726300AbfEBUq5 (ORCPT + 99 others); Thu, 2 May 2019 16:46:57 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34365 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbfEBUq5 (ORCPT ); Thu, 2 May 2019 16:46:57 -0400 Received: by mail-ed1-f68.google.com with SMTP id w35so1751526edd.1 for ; Thu, 02 May 2019 13:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p0rauU0ja3fR+oPmh7A/vlojiO16XNZbGFS9RST2+60=; b=Utp9CJUEOxFtr55aE1nrugTYkmR0xU54dXkC5U0oON7vdFRxWfEyIOj9VFCpeFYS5W TPxZvq7NqjcuhVbT+S9giMAiCwiHpX11hJlu9muRTwai2Mg897JaDmQ2hdEasPjtICuz GEGloN60OTTMoA4FApUKQSfeW6pOtM1aOJo5M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p0rauU0ja3fR+oPmh7A/vlojiO16XNZbGFS9RST2+60=; b=kcB9lyNVHw85TYqcVpRV0TN+sfayW5ZhJB4GrfuLS825DtmCIbDYXtdA+vTRwSQiyO OjYJxERYl1txETWiwEoVRVaw64ndcg5Bt+FRQrt83gHq1ZNoSBmcUB51uuGim4fSiO2o 41PFSRIZzyILa+BgwcrH+ImTb6BKTVAUeWe78SdYxQdiUwq1kyXJLbP3j3tcwJpRTXNL N2ngAFJ2MX1fy7N1R2G65MWqJm4pqAOhFxUy8kr8Rvood7Gn+6vWiNnt/qctqO+Bk+JU fyUB2JSWuhsIkIJ+D8L3elZtbvVR/pdEQ2i/zHFtpufcoUoYi5T9TrAgHlwFNm0n97h+ oXJw== X-Gm-Message-State: APjAAAXNWgcBNG8OwYBAymr/sDbyTXzZ0Cnp3UCPmsEImopPTd/gSeQe AGyj2rptLJP1GNYaBXjRxcg2Eg== X-Received: by 2002:a17:906:c50:: with SMTP id t16mr2927525ejf.296.1556830015518; Thu, 02 May 2019 13:46:55 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id x30sm30594edd.74.2019.05.02.13.46.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 13:46:54 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Cc: LKML , Daniel Vetter , Daniel Vetter , Andrew Morton , Tetsuo Handa , Dmitry Vyukov , "Paul E. McKenney" , Valdis Kletnieks , Vitaly Kuznetsov , "Liu, Chuansheng" Subject: [PATCH] RFC: hung_task: taint kernel Date: Thu, 2 May 2019 22:46:48 +0200 Message-Id: <20190502204648.5537-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190502194208.3535-1-daniel.vetter@ffwll.ch> References: <20190502194208.3535-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's the hung_task_panic sysctl, but that's a bit an extreme measure. As a fallback taint at least the machine. Our CI uses this to decide when a reboot is necessary, plus to figure out whether the kernel is still happy. v2: Works much better when I put the else { add_taint() } at the right place. Signed-off-by: Daniel Vetter Cc: Andrew Morton Cc: Tetsuo Handa Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Valdis Kletnieks Cc: Daniel Vetter Cc: Vitaly Kuznetsov Cc: "Liu, Chuansheng" --- kernel/hung_task.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/hung_task.c b/kernel/hung_task.c index f108a95882c6..d90d98f53ccb 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -117,6 +117,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) console_verbose(); hung_task_show_lock = true; hung_task_call_panic = true; + } else { + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); } /* -- 2.20.1