Message ID | 20230124193004.206841-5-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 s9csp2337224wrn; Tue, 24 Jan 2023 11:36:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJfg+OYPWqXq9b7AWlgMmWco7jMI7y+Z0/pr7vkuPxeNgy/53kB3BCumA7CgD4DDh5y6TE X-Received: by 2002:a62:5214:0:b0:578:5e94:22d0 with SMTP id g20-20020a625214000000b005785e9422d0mr29799052pfb.19.1674588965803; Tue, 24 Jan 2023 11:36:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674588965; cv=none; d=google.com; s=arc-20160816; b=vbmxgkgmpieKJgdhL5piSCZmeS3ijLIyZ75D6IXusoYXLy8cAR5ONScWgDMaOMQrZz UOWvoHQmG4Pq7wMaEpG2qoVlXtE9n5VEzqo+a1LlEyCyULmcK8NkB6rYBtQpu7z/rtRV aY/iAgiYxBprRDXd8tM9TlfMpn6WL6/+mqSe2S08if6HelKcW0z8Dm5aWq0QY/c8DMVQ twSjVDpKda9DLrU1QOFinTr8J+QZnTF96bQNJnEjhK8pm2bF9U+fvTHijXJBOUFcfbOy UItQu/EXe0ogtI0cidC0tWTUAoJT2jftkiAjEpiIdHgpi9SrEyL7JzDWJyg6AYjnMHlq Nh6A== 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=ERsdJUtcpVge3GQ6XX1aPWn9SwnDtCgNlHQOsfFG1VE=; b=ualc1OUwyx6/vvVxQlUWL7+q1MHXC+oiQDut+l1bZV+uImukWPjd7+aJYUyipjBQFf l5BpAea3gIFzo9sZwKfsisRl/R2yw0wPVT95R4JFR3w0xlZJsQT8apNTWcpiOWH+wDB6 RhQdqFPHuGvewUVmDGVZIPji7lYOyPO9r5oBFCH3sGQ0I0rvF+F5TwzeQy28BXksAxH7 KAe+UC5pfyl4moFWh6oQR+GrmgeOBnQwnz0J77VK67tVo2TZotSFjC5YOmDiQdbN2ZJ8 9pC+/zvoHeXpQ6oY1Jeg8qf4Fp2EknQUTZI5aVZb2fO2FvUDqAQRCipAbCf8pu7dyhsG w/WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mXxyy+bv; 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 b22-20020a621b16000000b0057d97f8e38fsi3249476pfb.216.2023.01.24.11.35.53; Tue, 24 Jan 2023 11:36:05 -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=mXxyy+bv; 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 S234657AbjAXTfc (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 14:35:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233658AbjAXTfU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 14:35:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A2461BE; Tue, 24 Jan 2023 11:35:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id B8119B811C1; Tue, 24 Jan 2023 19:35:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAF27C433A0; Tue, 24 Jan 2023 19:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674588917; bh=+7oL5czw8PyoM/EYPXeCaVwzsrxyOKl99cYF1jHLePM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mXxyy+bvsYXnh/NwLuQHTGGeExdv/mPqr4lJAO6/bNF1qCK1ib9uPk0zsoNoQ/JQ3 SGgjuF6iFTFrMdsVIkGhOh9B6DuDfivxWE7R9zKB4/FL7HAogoHvEC0SOi+UMns2zy kqRxXRhCbmzsFUCaBTyayElLAK2XhdkscSRi0BK8jwobojKkb/oIsgu8MWaVpRbRGN 4NeADRW2Qg+aO4A2LT7miYfaH49m9ZtRiNKjXPEkWyThYAy2sFUa6o28d/VD6Wc8Lv ZuCjjFf+yKL63zK/ElXrncMoF1o/4pHKTRSiU7c+9WlUkCX7ZfuMt6NsPhxaxHFPW2 3aNWDEZ/nYfdw== 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 04/20] ubsan: no need to unset panic_on_warn in ubsan_epilogue() Date: Tue, 24 Jan 2023 11:29:48 -0800 Message-Id: <20230124193004.206841-5-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?1755933799311336793?= X-GMAIL-MSGID: =?utf-8?q?1755933799311336793?= |
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 d83ce027a54068fabb70d2c252e1ce2da86784a4 upstream. panic_on_warn is unset inside panic(), so no need to unset it before calling panic() in ubsan_epilogue(). Link: https://lkml.kernel.org/r/1644324666-15947-5-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> --- lib/ubsan.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/lib/ubsan.c b/lib/ubsan.c index adf8dcf3c84e6..d81d107f64f41 100644 --- a/lib/ubsan.c +++ b/lib/ubsan.c @@ -151,16 +151,8 @@ static void ubsan_epilogue(void) current->in_ubsan--; - if (panic_on_warn) { - /* - * 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) panic("panic_on_warn set ...\n"); - } } static void handle_overflow(struct overflow_data *data, void *lhs,