From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7415C433EF for ; Tue, 8 Feb 2022 13:39:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 493CF6B0078; Tue, 8 Feb 2022 08:39:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 442EA6B007D; Tue, 8 Feb 2022 08:39:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 331F46B007E; Tue, 8 Feb 2022 08:39:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0068.hostedemail.com [216.40.44.68]) by kanga.kvack.org (Postfix) with ESMTP id 258A36B0078 for ; Tue, 8 Feb 2022 08:39:47 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D02A4180DF45E for ; Tue, 8 Feb 2022 13:39:46 +0000 (UTC) X-FDA: 79119720372.20.C155171 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf08.hostedemail.com (Postfix) with ESMTP id 77FB9160003 for ; Tue, 8 Feb 2022 13:39:46 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id y129so13591535ybe.7 for ; Tue, 08 Feb 2022 05:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AB43GeMhzoWNJcuHGVxX4xPDF6JvmahIqFg1wRbGD9E=; b=JBVhCpQm4U1bayIyDFb2W7GCme8X/VBGonuobVv7G4Temo3gqMH7cdtrDi2dDqME8X qlUA/R+m0zXhAexPkTFUtqBqNdoZFt5qbB3plHDoz88JqFfTu1aVkMsyfF0EgOxSzRda 1qIItw58w7UETvuGE9pDY1enmMQNK5prZ11UOZli3ZxaO3wMknlDmvZZwRcTEHf0up15 +x6imdr/QjOS32lq+KtVY5HaiaYLz0lId0zPpB/fFR02/XlTzSHkm3NLqReoUijVSamF GSioTb7+A/ha9n1Jfco5RxwxnQ8nipskEL9uEvqm4//wVfCwNANLMa1pGh9GJYfteVTC lc0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AB43GeMhzoWNJcuHGVxX4xPDF6JvmahIqFg1wRbGD9E=; b=ZSshkllxDtsWv/kLszeJuNj06/BYozZChUpR1lAyD8Lz2tzkLkUF4JDa7A9wKwRY6Q clmtAQJ6/CiedeuwvrJU5DUFnoOzNjbaEb+KQOyh0gWUW66jxz///1XbUlyVevxp/XzF 4FQkuzltmzfZL+UAUWam2qGI0sWsu3zLseWzzC88rVKWl3HYPD+kZ/i3IiWQdZyIKZCJ h4faCtKSRsofMLcjY3w9jEY+UtQMqHpXXS8HHqjILdw7GpgKOmt+TLTd5J4hYxyhuK+2 x0JvPKPs7aemMd0vW8vBmNCYchG5qe2DiJ88RYb2U27Ey7QL3LK3hR+eTFwxI/zR4qCM J48A== X-Gm-Message-State: AOAM533LrHgV/naOOp7BoNBg6Vu3dhaBJaMCXgsqYaG2b/Xk3rscArTO ADvMCQtdsNubkk8sn7KZ0ohbrE3QZV9fiDsGe2NMCw== X-Google-Smtp-Source: ABdhPJxbDgXMBRv9C+RY1p8OyAGygwZn2GL78Z4+WOtcMuUdETn286pOhYdPFjFTIV+onoiigXO8dnUZoDWUsoPYX8M= X-Received: by 2002:a05:6902:1548:: with SMTP id r8mr5071533ybu.374.1644327585600; Tue, 08 Feb 2022 05:39:45 -0800 (PST) MIME-Version: 1.0 References: <1644324666-15947-1-git-send-email-yangtiezhu@loongson.cn> <1644324666-15947-6-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: <1644324666-15947-6-git-send-email-yangtiezhu@loongson.cn> From: Marco Elver Date: Tue, 8 Feb 2022 14:39:34 +0100 Message-ID: Subject: Re: [PATCH v2 5/5] kasan: no need to unset panic_on_warn in end_report() To: Tiezhu Yang Cc: Baoquan He , Jonathan Corbet , Andrew Morton , Andrey Ryabinin , Xuefeng Li , kexec@lists.infradead.org, linux-doc@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=JBVhCpQm; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf08.hostedemail.com: domain of elver@google.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=elver@google.com X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 77FB9160003 X-Stat-Signature: iiqgjtdcxpz4zy6g4rnjwagktnqh8aum X-HE-Tag: 1644327586-300554 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 8 Feb 2022 at 13:51, Tiezhu Yang wrote: > > panic_on_warn is unset inside panic(), so no need to unset it > before calling panic() in end_report(). > > Signed-off-by: Tiezhu Yang Reviewed-by: Marco Elver > --- > mm/kasan/report.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/mm/kasan/report.c b/mm/kasan/report.c > index 3ad9624..f141465 100644 > --- a/mm/kasan/report.c > +++ b/mm/kasan/report.c > @@ -117,16 +117,8 @@ static void end_report(unsigned long *flags, unsigned long addr) > pr_err("==================================================================\n"); > add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); > spin_unlock_irqrestore(&report_lock, *flags); > - if (panic_on_warn && !test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags)) { > - /* > - * This thread may hit another WARN() in the panic path. > - * Resetting this prevents additional WARN() from panicking the > - * system on this thread. Other threads are blocked by the > - * panic_mutex in panic(). > - */ > - panic_on_warn = 0; > + if (panic_on_warn && !test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags)) > panic("panic_on_warn set ...\n"); > - } > if (kasan_arg_fault == KASAN_ARG_FAULT_PANIC) > panic("kasan.fault=panic set ...\n"); > kasan_enable_current(); > -- > 2.1.0 > > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/1644324666-15947-6-git-send-email-yangtiezhu%40loongson.cn.