Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2885672rwb; Mon, 15 Aug 2022 13:18:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR6xrI7AGI7pNuy1qHscq8CmL/CAsxUM1jPH6F3oz8Twg7SaaUHo/0iSZcm0pnKbZD2KCfvR X-Received: by 2002:a17:906:9bdd:b0:730:5b04:7298 with SMTP id de29-20020a1709069bdd00b007305b047298mr11952911ejc.180.1660594697628; Mon, 15 Aug 2022 13:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594697; cv=none; d=google.com; s=arc-20160816; b=wH4BveqQIzputZ2iV69LQXFSvY3BSem7sAKzuhSr7TEFP9FoOhMFdHQlQk1am/rmUs 31F40E0x9/N44m945MliB+xgR6+aGgQH+YO1MM+6KlBBu6YS8Bi0pbIUJbexGrozDJq7 dboHrXXTgR4Aazju7PX/Af+jHQVncXgEhFkRNG0gqE2/WLemwFK5BWdJA2qSk0waAVY3 HIU1ysdkU24IEO4l0gRon/6QZ/P49c5xpDUIAmbPn7Bzjt4weTOOY0d3nT2sKNl5r4Hr NFxqombPtvgzHC19BQVIjGQn6WQ2eRNMeDpuevmHHcUPfNsQiK2zW4pHttNEOXPziSrV S8LA== 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=K+SEppHFDoizqQCkaJpAJJ86v+Pb4ELWkN8f2qT9IiaqhRKYq40N55DfpEX8OueQjN pzld8T2ZAe0kG3mlDYD8OkWLI3Jtwe+dKphWh5QuH3e0oWK5yeuTxxCswKn606hPKI76 +TmaR7Z9nNBKqTFfFQlTz2zbQggxegoRfynAzCDY18Anxq45tzMJG4SiB8n/yNszNazG G5El4OwS2iaRwAVgdWq5yBo3671QfLHbybEMgftv9NIgcfsWSRlkbKDQuXVSPjHcuMpQ D88FHiWCn9qEaM9ZgFYyTLgAJ2qZpeGKeOWxsNWt/Jg7lltSV4jkWzYRysqkAlEOaKSX /KCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J63gjBUK; 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 c13-20020a056402120d00b004424ff25f21si7814891edw.407.2022.08.15.13.17.51; Mon, 15 Aug 2022 13:18: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=J63gjBUK; 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 S1343578AbiHOTh4 (ORCPT + 99 others); Mon, 15 Aug 2022 15:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344821AbiHOTbs (ORCPT ); Mon, 15 Aug 2022 15:31:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36AE061B0F; Mon, 15 Aug 2022 11:44:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 9DE2EB81081; Mon, 15 Aug 2022 18:44:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E24A5C433D6; Mon, 15 Aug 2022 18:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589092; bh=ZlNZIoT0xcoVZ4uXOg7Rh64aSqYXluwZIxnpm37NvZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J63gjBUKkqOXjC+II/OPbpsbDuO/xwg1mxUhCugQ0DW/8+EG4aD2gK2O1HgygNREO Qi/znYi6V79FQqy3hORtxRgSf1H5UmVHF8So1/5saSKS4WWMA2q9wMLRZV2qHQUvuH Mv4olWadYy0tvOl9Q83h3NDRuGRTKKv2Q7r2OupE= 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.15 611/779] lib/smp_processor_id: fix imbalanced instrumentation_end() call Date: Mon, 15 Aug 2022 20:04:15 +0200 Message-Id: <20220815180403.490114359@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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