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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1A51C3527C for ; Tue, 8 Feb 2022 22:26:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387655AbiBHW0A (ORCPT ); Tue, 8 Feb 2022 17:26:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386462AbiBHUgJ (ORCPT ); Tue, 8 Feb 2022 15:36:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7C8C0613CB for ; Tue, 8 Feb 2022 12:36:08 -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 273DBB81D09 for ; Tue, 8 Feb 2022 20:36:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAB2EC004E1; Tue, 8 Feb 2022 20:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1644352565; bh=la5nkSR/z2wTgGnrQxeNA02ggE98q3YblZphVvmec38=; h=Date:To:From:Subject:From; b=OAI2Uz+Jemq4z1995QHLIzSr7l0MV3iLLO3WQB0W7BN2gcNGPCev9oTypTj7z7z5x LuCN7hHSJcs3b1tt0oHkRR5vGuCN2ks/IB+Wv/GwVTf6dlSL4AwpMUre5dnuB+YrmX i8D4XpThLoqQi4Ne0R7bvYmtmXijBYN00V+ht008= Date: Tue, 08 Feb 2022 12:36:05 -0800 To: mm-commits@vger.kernel.org, ryabinin.a.a@gmail.com, lixuefeng@loongson.cn, elver@google.com, corbet@lwn.net, bhe@redhat.com, yangtiezhu@loongson.cn, akpm@linux-foundation.org From: Andrew Morton Subject: + ubsan-no-need-to-unset-panic_on_warn-in-ubsan_epilogue.patch added to -mm tree Message-Id: <20220208203605.CAB2EC004E1@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: ubsan: no need to unset panic_on_warn in ubsan_epilogue() has been added to the -mm tree. Its filename is ubsan-no-need-to-unset-panic_on_warn-in-ubsan_epilogue.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/ubsan-no-need-to-unset-panic_on_warn-in-ubsan_epilogue.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/ubsan-no-need-to-unset-panic_on_warn-in-ubsan_epilogue.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Tiezhu Yang Subject: ubsan: no need to unset panic_on_warn in ubsan_epilogue() 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 Reviewed-by: Marco Elver Cc: Andrey Ryabinin Cc: Baoquan He Cc: Jonathan Corbet Cc: Xuefeng Li Signed-off-by: Andrew Morton --- lib/ubsan.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) --- a/lib/ubsan.c~ubsan-no-need-to-unset-panic_on_warn-in-ubsan_epilogue +++ a/lib/ubsan.c @@ -154,16 +154,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"); - } } void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs) _ Patches currently in -mm which might be from yangtiezhu@loongson.cn are docs-kdump-update-description-about-sysfs-file-system-support.patch docs-kdump-add-scp-example-to-write-out-the-dump-file.patch panic-unset-panic_on_warn-inside-panic.patch ubsan-no-need-to-unset-panic_on_warn-in-ubsan_epilogue.patch kasan-no-need-to-unset-panic_on_warn-in-end_report.patch