Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3084724rwb; Mon, 15 Aug 2022 17:45:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4udDR9a9PNo+8ANvUE+xoAqDgn3ILogElIOtkLUXaY4T9BtpO+Rqcna32X5qNhckkHMQf2 X-Received: by 2002:a05:6a00:2342:b0:52e:6c99:a55a with SMTP id j2-20020a056a00234200b0052e6c99a55amr18945861pfj.32.1660610717965; Mon, 15 Aug 2022 17:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610717; cv=none; d=google.com; s=arc-20160816; b=p62g6Db3omfgEJkNM/4+Mr6uPE0Gq1WeZb/hRKOnSGPwSe8M7Eho1r8UPTQRzvrnRA h24dq7PLjvnbVod8W5pl0GJZOeT/HDOaiS69VhI1+uRQ98TM/WRkxRI98isnv7UEgCep 43jDuZziKxx4MU/sLVkWRtMBtOWsTx5fUDC92FQCZKUn2jO6Y9T5aDAlotsE71xagcD4 MOOUJ6ImRysJfH4sScod6O4asQX0g/UMVJLBYte3yq5D1vsFaIosNtg5HEkMrODwKP1H TDG/iLXDljvxatJjxCuJwFXMQuA4JvdMbzxxfWZl6sNRdt8ajWmvSsKi+NOtqAdFJHZM qvlQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aJ8y0h+S4DwRpQinScRPrD7BmhuI9DPCpOE5Kb3kHkk=; b=xQzf8BmYV3O3isSf3blJaGKhPOxueQXd0T4mZe7WD2UarAJGbTdcIkKxUaSG5IrnOR KyS4AVuxCikVVnEiK2eSkt8giDKo5rNxua9var5UbV5ZvBX/JGWx9BP6vJeF9leo1XWT KohLgKDntz9Iy1gA7kcEILhItq9xE2FAN6vmssaHnZqbrE+OC7mHlAAcVIbNVj3WkLjC W8AH/Fuur6Cw2v57nLV0oLV/6NAGH5pjFHanSD5C92KuRp0ylYnQPOSVGq/eKkTHYv1I Pox80tHEMe6p8jj9SjssXwwUITRokFXLGrTHfArNZmmZD0ORmlNpfXUnb++iWjk7F+Qx Lwtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lu8tK1LD; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 81-20020a630254000000b004224f632c9asi12512843pgc.328.2022.08.15.17.45.06; Mon, 15 Aug 2022 17:45:17 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=lu8tK1LD; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351483AbiHOWoB (ORCPT + 99 others); Mon, 15 Aug 2022 18:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350177AbiHOWi7 (ORCPT ); Mon, 15 Aug 2022 18:38:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A205D7333A; Mon, 15 Aug 2022 12:51:22 -0700 (PDT) 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 E535F61231; Mon, 15 Aug 2022 19:51:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D17E1C433C1; Mon, 15 Aug 2022 19:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593081; bh=ZlNZIoT0xcoVZ4uXOg7Rh64aSqYXluwZIxnpm37NvZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lu8tK1LD72Uwv17ymOPA0lChmLhO421nX4fdhQAc4aO728X5zAiSXNxFaE0iyTsNI GdFIEuzOFTBZMDHUbqasdoM0pTYVuIBUNqJTjyZcZZhydiQ9UsJ9t50JX5+f4XlY6g dTzanmIPxXZqemK0iTyHFH7IJpAUifSvO3GzG3dw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tetsuo Handa , Thomas Gleixner , Alexandre Chartre , Peter Zijlstra , Andrew Morton , Sasha Levin Subject: [PATCH 5.18 0889/1095] lib/smp_processor_id: fix imbalanced instrumentation_end() call Date: Mon, 15 Aug 2022 20:04:48 +0200 Message-Id: <20220815180506.110894226@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Tetsuo Handa [ Upstream commit bd27acaac24e4b252ee28dddcabaee80456d0faf ] Currently instrumentation_end() won't be called if printk_ratelimit() returned false. Link: https://lkml.kernel.org/r/a636d8e0-ad32-5888-acac-671f7f553bb3@I-love.SAKURA.ne.jp Fixes: 126f21f0e8d46e2c ("lib/smp_processor_id: Move it into noinstr section") Signed-off-by: Tetsuo Handa Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- lib/smp_processor_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 046ac6297c78..a2bb7738c373 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c @@ -47,9 +47,9 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2) printk("caller is %pS\n", __builtin_return_address(0)); dump_stack(); - instrumentation_end(); out_enable: + instrumentation_end(); preempt_enable_no_resched_notrace(); out: return this_cpu; -- 2.35.1