Message ID | 20230124193004.206841-6-ebiggers@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2337134wrn; Tue, 24 Jan 2023 11:35:51 -0800 (PST) X-Google-Smtp-Source: AK7set/1LXhGBe8klCZP6agvWgBI/IE0+nmIqrXyebzoZZmMYmM42BgS9ZReI4RxoLootCfhCbn1 X-Received: by 2002:a17:902:f68f:b0:196:1f80:1066 with SMTP id l15-20020a170902f68f00b001961f801066mr1609412plg.11.1674588951211; Tue, 24 Jan 2023 11:35:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674588951; cv=none; d=google.com; s=arc-20160816; b=AVp/u0jYxGaC+jcfUxTOVH91kBfnGL6DA1iCaelTTfCFhohSG5X7uJllS3Iqi69/WG jpOxmV6r5CxXPzBJ3GMJtDRgxHg8y7qyZlsplfxbCHidH+BOztlunlbV4ncSAfghR8HA 0cxXfphtGvcXLBqMBVudUFdXfGHHhomgXufzwcqKLi5jZgsc2k7kXgvDF9HxDOdxw6ak BOibaX+nO2vR37fm2PAl8z2/aPYS8wR0OvpZ/SFhYzgpyZzHA6j8IPLRS8vPpPPqICkH rLqenRK9+cYmRa+FWKWf58RrsJ+Q9ui2I9KajSU0qH6lGxlAwdpL5xEeTWSfMZd+cwYo q7Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XJyV866vUDhhogmDxSvV+HIdf9B5gQNxykCMDtJgMxg=; b=YgouF17W54T7o3bNzJzx1XKmP9HkQ25Zzhsh1u8GpJrsTfdxoH66aCCN5iv4AEV6n+ yZ2NSIIGYpKdcpPFYDOeRo2lNMtCo0BgO+r5F3Oeu90EpoVKKdKI19+2ZrDp4cXDHL4y XcGRIp2CMilqkpHf3wzjvBixNydBZC5+1c3pQCh280CNWz3QUk1H7wTCPz+3n/Aa4rJ7 ow4yJ3tEviAyBe8VKVqug/Bp38dsTni5JPKmnn+t8x2VRt6CDKJxe+qbHYjXpsjBej/N 4bfIqYFxK89Fam1r6o5VXNu6W6on7KNdLFrY82byAPR3Hj3/uYphC2KLB5QsDGOhtkeX T8sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tac5SMnc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 73-20020a62154c000000b0058e061e0fddsi3217346pfv.174.2023.01.24.11.35.39; Tue, 24 Jan 2023 11:35:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tac5SMnc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234606AbjAXTfa (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 14:35:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232748AbjAXTfU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 14:35:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211FE30CE; Tue, 24 Jan 2023 11:35:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AC9E461331; Tue, 24 Jan 2023 19:35:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95731C4339B; Tue, 24 Jan 2023 19:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674588918; bh=reCuICm+K+YhUwzsmXaRq5UNboz+RmnhzpLO8l+L/qQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tac5SMnc8nE4DSaErhZbUvMLGNg2wf++b/YDkLgCBRVkKZDemrF7tWvEC6bJBIkCD VBcM3f9hZt6UII4gvvOGARJdbZIHgsF96xGSZ0xa+KQpLEwNhr7XPSaYs5xQIOzJ5g GG02FroKVtJYaCYskTF/jcfqmKkjQUWtoE3QZjsDV+8022V7rg6VQGEE4F/nFj3dH6 +dBNi+ccjwoKl6YBPDLwPLDHkZKsz6Uw0pDXXwuGo0PUH8AqIbtcoyMklTs/JzRIq1 UsEfzE0T9I2x2nvncsksmzfNQnfYv3GtoMt3flol3DbTLHO+1dYx1I0ExxL1GLlcSY A3+ZBaBN37txw== From: Eric Biggers <ebiggers@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Kees Cook <keescook@chromium.org>, SeongJae Park <sj@kernel.org>, Seth Jenkins <sethjenkins@google.com>, Jann Horn <jannh@google.com>, "Eric W . Biederman" <ebiederm@xmission.com>, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Ryabinin <ryabinin.a.a@gmail.com>, Baoquan He <bhe@redhat.com>, Jonathan Corbet <corbet@lwn.net>, Xuefeng Li <lixuefeng@loongson.cn>, Tiezhu Yang <yangtiezhu@loongson.cn>, Marco Elver <elver@google.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org> Subject: [PATCH 5.10 05/20] kasan: no need to unset panic_on_warn in end_report() Date: Tue, 24 Jan 2023 11:29:49 -0800 Message-Id: <20230124193004.206841-6-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230124193004.206841-1-ebiggers@kernel.org> References: <20230124193004.206841-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755933784287020534?= X-GMAIL-MSGID: =?utf-8?q?1755933784287020534?= |
Series |
Backport oops_limit to 5.10
|
|
Commit Message
Eric Biggers
Jan. 24, 2023, 7:29 p.m. UTC
From: Tiezhu Yang <yangtiezhu@loongson.cn> commit e7ce7500375a63348e1d3a703c8d5003cbe3fea6 upstream. panic_on_warn is unset inside panic(), so no need to unset it before calling panic() in end_report(). Link: https://lkml.kernel.org/r/1644324666-15947-6-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Reviewed-by: Marco Elver <elver@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Baoquan He <bhe@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Xuefeng Li <lixuefeng@loongson.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Eric Biggers <ebiggers@google.com> --- 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 00a53f1355aec..91714acea0d61 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -95,16 +95,8 @@ static void end_report(unsigned long *flags) 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"); - } kasan_enable_current(); }