Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp346921imu; Fri, 7 Dec 2018 02:01:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/VURZ9IHQyus995d/++l9iK68+6mcF1o5u5qQyKnNTYTMnJQBwGcWeFyl+/xyz9lpKZ03Vv X-Received: by 2002:a63:1c61:: with SMTP id c33mr1330260pgm.354.1544176885556; Fri, 07 Dec 2018 02:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544176885; cv=none; d=google.com; s=arc-20160816; b=NpyUX0e5zuLQY9vFsBtVVNwkQJ57yZnMZEgsj2t2uf4MEpvTW+4ddJz672MjGzB9yj 1FbmB+F4SMZtfyWTNNXFBiFg/pR8IqJ/MZIg+5VfxYcmjJLA9qMVKnd/ajKhjVx33yqj MC6ft9mwODpOnVoJGt9OExOVmEmKJdSP8gxTtYthJ0y9JA94HiJCuvex04x52twkQYp0 /aHHxp0ZLOK21VLtPWULpzCv5lyBlQVFN7wg8nDzkObYFIrFS71RkOyrzEWQsh1Zqk3z CECFoKmkv+jQXeUuD8KlbUIA0LFL9Bg+iwVSlFVyVOJDtC7cbRJMvSZXobeSE5n4RICb VDig== 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:date:subject :mime-version:cc:to:from:message-id; bh=Bt0AvkCKm6g1zzy/6peJwlSSXo12bGLb58qqiwHDVgY=; b=LBD76mJrlXY3QDK6snbKeZqDvNOle+WQXsy/Kbk99MOzrgO/e6RQ0TWcZH0GfF8eI3 aeX74HCSKqSHQhl/tMxgIG8TVY71QQ3PGJBgKAdZa+thi1KeV6+WBtiBp5l6iutjenQE MBavBk3fUk+XvIfR9DyFUqglw1mdAknwAChLt808iS/aGljS7qbx6q28fbSA+SPpGGRc er5oLBA/RpGmVAD2xbkhGEYRR9px1KHURdocW7NRVPjVebceYYdgzpCOKMh8zzMME/s4 lsa+IXxMbkJRDl/AW6PMOYNGdqS3Ju9tqU2xBep6/vmb7wXZwZLBkMEJncrHKAK+/RgK nzcw== ARC-Authentication-Results: i=1; mx.google.com; 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 f24si2555362pgj.315.2018.12.07.02.01.08; Fri, 07 Dec 2018 02:01:25 -0800 (PST) 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; 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 S1726008AbeLGKA0 (ORCPT + 99 others); Fri, 7 Dec 2018 05:00:26 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:10626 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725976AbeLGKA0 (ORCPT ); Fri, 7 Dec 2018 05:00:26 -0500 X-UUID: c0f1160fe05d45a08ee08b8785f1d644-20181207 X-UUID: c0f1160fe05d45a08ee08b8785f1d644-20181207 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1596845979; Fri, 07 Dec 2018 18:00:22 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 7 Dec 2018 18:00:20 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 7 Dec 2018 18:00:20 +0800 Message-ID: <1544176449.1251.6.camel@mtksdccf07> From: Kathleen Chang To: CC: Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 Subject: sched: panic() in schedule_bug Date: Fri, 7 Dec 2018 18:00:20 +0800 X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: F897493CD091455AA081F3AFE66BC14016A10A15704A4E32C53CD8F2A9D2BF5C2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi, [kernel-4.9, kernel-4.14] When preemption disable in schedule(), Current linux design will panic when panic_on_warn=1 However, default setting, panic_on_warn=0, and if panic_on_warn=1 , and call panic() after printing out WARN() location. It affects too much cases. Could panic directly without checking panic_on_warn? This is obviously incorrect behavior, and should be panic to prevent misbehavior. if (panic_on_warn) panic("scheduling while atomic\n"); thanks! ============================= kernel/sched/core.c schedule_debug => when in atomic preempt off => __schedule_bug ====