Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1321889pxk; Fri, 18 Sep 2020 09:21:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgZSFAgLt6NWt0D+UFNVmmQXkU4okxySSgQnqO/DJ3biR9bBy6JiW9r10K69vecVzD969V X-Received: by 2002:a50:8881:: with SMTP id d1mr39802952edd.306.1600446090711; Fri, 18 Sep 2020 09:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600446090; cv=none; d=google.com; s=arc-20160816; b=MJyfcJw2zL/qi435+LRNajEjWwAxa/7nHngadUSQ9wB/TNiavl187ropfOI7EiResz 7yddtCSKKQ3aFV3s3tDgrR67mIYU880o+Mtoects8QR92pGSl+lxPOgi9d20jbq74aRQ 7y04xLNKAdJ2/6KppmCE2u6EBmgXEd2f5qkJS0uEzP+OoBgT1QIW22V2GfKk6bZdjCdz iyholYMIdxIqH1b7vSzF3Jh2y57VFOc/wj4g6TC/s18Vkk9Yjwrn21B93QGA4XTFkQ+h /SXCEKrDySOVsCX6XxG4pGzKTglt/3wORpzxYFrEDpVbdFj9loVwAwmX4DGmHHS+TR+/ kA/Q== 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:subject:cc:to:from:date; bh=zx56SjesRnTvof3dDaIOJ4j+g68JgVdWPQq6ihso+84=; b=yYzqnoEn7fcxbuiZvy/ueJ5ys8A0+4OieLCqAjsUiix6cl2V2uBHJ7M1Tf+/Gb+T4V +geChSJhrH9BtqfkPmid7dD3kjFV39JglH/s/5bEpl4727JTVmFegPNdXCMiG24lgU2+ GQIO/plGRvINgVOiaJlwjSKLYaKZbpCvl3mgr3x0y9tIF6t30nFKdMyf3yr6JT5M0SpB xm/5FWTAMqtEU6kIOjT+g53I7kxy9bjC3AmmQNcQb2zInXp90A88cLCe4xrcf95KOd4o yDP3KAe8ejtRLaeJLetwktSJJDttgVjMrZFSzgs1XUGGo7kHwhgjeuBaVSOhXGIcrqBD +42A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si2510043edy.472.2020.09.18.09.21.07; Fri, 18 Sep 2020 09:21:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbgIRQUL (ORCPT + 99 others); Fri, 18 Sep 2020 12:20:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:60580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgIRQUL (ORCPT ); Fri, 18 Sep 2020 12:20:11 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 510C420795; Fri, 18 Sep 2020 16:20:10 +0000 (UTC) Date: Fri, 18 Sep 2020 12:20:08 -0400 From: Steven Rostedt To: Miroslav Benes Cc: mingo@redhat.com, peterz@infradead.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org Subject: Re: [PATCH] ftrace: Free the trampoline when ftrace_startup() fails Message-ID: <20200918122008.7b21f77e@gandalf.local.home> In-Reply-To: References: <20200831122631.28057-1-mbenes@suse.cz> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 31 Aug 2020 14:56:57 +0200 (CEST) Miroslav Benes wrote: > I used Masami's address which did not work. Sorry about that. Should be ok > now. Thanks Miroslav, I've queued this up to be tested and pushed as urgent. -- Steve > > On Mon, 31 Aug 2020, Miroslav Benes wrote: > > > Commit fc0ea795f53c ("ftrace: Add symbols for ftrace trampolines") > > missed to remove ops from new ftrace_ops_trampoline_list in > > ftrace_startup() if ftrace_hash_ipmodify_enable() fails there. It may > > lead to BUG if such ops come from a module which may be removed. > > > > Moreover, the trampoline itself is not freed in this case. > > > > Fix it by calling ftrace_trampoline_free() during the rollback. > > > > Fixes: fc0ea795f53c ("ftrace: Add symbols for ftrace trampolines") > > Signed-off-by: Miroslav Benes > > --- > >