From patchwork Tue Sep 29 10:56:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 291135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2A3AC4727F for ; Tue, 29 Sep 2020 11:37:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EB5C21941 for ; Tue, 29 Sep 2020 11:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379454; bh=8moSyQWcR5Dfn0LKMN/FdEuxOvN9l38MDYQEaW7SuiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nlcKkAIjizCZ3nhGM5/Eq7kSTaUQUDqotjDIExgy7rUnUJlcDhcxu8CDje1puUkOR V1l1ni7UC+rjJBrNlGZ9T7BlWvRZBDIlS8cae7xog1jBrN+ArABPrEpXRTwDzQQRlE hpAalJm7O+d5ylGhLoE7VDMtybDiymNdNXbtVznA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730163AbgI2Lhd (ORCPT ); Tue, 29 Sep 2020 07:37:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:54450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730111AbgI2Lh3 (ORCPT ); Tue, 29 Sep 2020 07:37:29 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6567923B2A; Tue, 29 Sep 2020 11:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379232; bh=8moSyQWcR5Dfn0LKMN/FdEuxOvN9l38MDYQEaW7SuiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZVOsTHvC87CuIfkZ8oEhLSGr0BNlZdTE2hNmCPp5BE6g+A434tj7YE8bUApN6qPiJ 6FswTb7HzQAErLtoicS/GYM3U7dgAHSOnEXUu04KUDC3WNFrimIZDsw/8YhSKjfhZd aWGNXF6YLbr/AppWLTDuXVUVy4qQfOrt68U7Uons= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jessica Yu , Divya Indi , Peter Zijlstra , "Steven Rostedt (VMware)" , Sasha Levin Subject: [PATCH 5.4 072/388] module: Remove accidental change of module_enable_x() Date: Tue, 29 Sep 2020 12:56:43 +0200 Message-Id: <20200929110013.978142707@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Steven Rostedt (VMware) [ Upstream commit af74262337faa65d5ac2944553437d3f5fb29123 ] When pulling in Divya Indi's patch, I made a minor fix to remove unneeded braces. I commited my fix up via "git commit -a --amend". Unfortunately, I didn't realize I had some changes I was testing in the module code, and those changes were applied to Divya's patch as well. This reverts the accidental updates to the module code. Cc: Jessica Yu Cc: Divya Indi Reported-by: Peter Zijlstra Fixes: e585e6469d6f ("tracing: Verify if trace array exists before destroying it.") Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Sasha Levin --- kernel/module.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 0e3743dd3a568..819c5d3b4c295 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3753,6 +3753,7 @@ static int complete_formation(struct module *mod, struct load_info *info) module_enable_ro(mod, false); module_enable_nx(mod); + module_enable_x(mod); /* Mark state as coming so strong_try_module_get() ignores us, * but kallsyms etc. can see us. */ @@ -3775,11 +3776,6 @@ static int prepare_coming_module(struct module *mod) if (err) return err; - /* Make module executable after ftrace is enabled */ - mutex_lock(&module_mutex); - module_enable_x(mod); - mutex_unlock(&module_mutex); - blocking_notifier_call_chain(&module_notify_list, MODULE_STATE_COMING, mod); return 0;