From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A1CA2D8379 for ; Mon, 2 Mar 2026 08:08:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438910; cv=none; b=PgfBTFdwkyDOoQgLb0cGy9Xi9rngySY7wLYNheSRbO6sUl9gMuodnCPh6N0FhvW4LD27hPNRmh6hpz1RVmQGEnPIYiBkINI5sMCtVwrOUA0T3rv2BdoHXQQngp+ZuznABlbPHfmjEVuysvyquN/XE9tBBDCNJ8lXUafLs9hYX0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438910; c=relaxed/simple; bh=7dXyK6ozsmvSacmZBQXL9e0JKE9D+/u5o80S+8Bbcz0=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BqKVmqJi9FBzOpDFEYLuwkiby4zpxD3dw0307xt53+DWGsiDs3m/X98th6e3qS1+EgOSbKiAQBLddd+HUY3QcbdT+Yob550HpFATZ4zbNrkK1PpJvIe9q3fyeS3iYaH6KR2UQ5uSnRJ552JRKdSE+AzbgPS2q2RTYCUmwFGAtzQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Kgg9nmyh; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kgg9nmyh" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-439b9b1900bso255514f8f.1 for ; Mon, 02 Mar 2026 00:08:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772438908; x=1773043708; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=Aywtoeuxkfunv4Ek8XeTDfrALEqJk4nC+4MbytSvfC4=; b=Kgg9nmyhwDp4M9HxRLZCuIzZA5/Uknb/21gXD8tW16u5VXQD4uOaRRjOMRLa+S0ln1 FYMh4hRMKsAw2/Wavl65DdBmEgXh1i3cWcRu+Cmn4RpXHC4nkqMS3rwi+XdnHfoYv8zd Be63uF0qJAXsPox8RWRIf85ptWQamnaqYsPR8xf3lQxf0IMC2TKYwWM1T6woajuXyBp8 ZTn8y9u/6mPs6HszeDO6EyAHc4jGwoPOPmUkfXBMnUTChdsaM1TztplXdqOyI9fr475f zCSwJ6ES3MA1JSGGMD4C25ZDEN27Fg3hXiGardbuEYDyMeuteGkTmUd2ccwlcj1hzPll fMNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772438908; x=1773043708; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Aywtoeuxkfunv4Ek8XeTDfrALEqJk4nC+4MbytSvfC4=; b=RiLQ0kgLXluELjiXYu4R7osLP8eV6Tqlr7aDrMDWs+KvWdpYR+39WhEIpxpfawJKiw m6X4D7uMCLIDnqscBM3RUhF9mzq72A1VUlqvUOby2wOKVhJL/KeavLJEluYDsZxC9EcG VJI5B2FPif8zeNVVmFOnKTukefbwTYgiJMxNYv4GgH9nug2TpzaW/2ZCwjZTWbtcoXTL FL6C5FiVPPGa32v60EULyr0QsH9E3xc1qOJ036PqCZe70PJW6oH/+1U5oCuBM5yepJ38 z9kxjm7nGkfRukVU0ktio7eot2/XsNBjlKrbYPyVaT9qBwo0RHISbuy46jrcPQal8aRu /gvw== X-Forwarded-Encrypted: i=1; AJvYcCXkCykX8exJZQpcsVEPPu/8kB3BNh9Ga4JJOy8aPADZb0XZ+LMnDYLzRF2gjogzvRhSbi/XffngS2BzrRY=@vger.kernel.org X-Gm-Message-State: AOJu0YwXKCmiDsq4id68Pi/49IjBeOtjDHEoYVBw2zoXmbOV2k0F/LIl oLwFRFrwYxlKCeaPldIO7EkHNrB+hwzcTvijN9Lu+SFYZvJxsmwEDKHc X-Gm-Gg: ATEYQzzkw4ttc5HYHQcOuh918BMuI28DP+HLI1oX2sKsnGfdiMBo7Lkd7U3cvEg6gNf 5dubBsFT+aHddso/Hv9F/F7RunEVZJDkHW9ose48Y47eF1x0JQvvH3o5eRhO8Ad2sEK3NoF47/j py1QiapSgWHPgrW6oA7MmyBVxm2/vgMQqUghXhXo9jSxUcipPj6AbSj/xYDx/b9HnHBVn4Fc93w uwBjMFsV29gfk5PdDyCDawE8gYMlcOoDPUoBX64VNXgxBKsMRQQQC60R9ZMlyG7Wq0qMUGkBkgd AQI53NY4FsDgepagX6hELoq1YtO+ym01Vh4godY0lsa2ChM2RfMYRtriWMoX4jkfW+C/3+7s69Q /muGGA1fN/HIgG9+4fW37z8jKBPGAFwtsjn2IfkD6oWs29hnCkcYVZWsQc4ZXUVGtYwzpxhuW X-Received: by 2002:a05:6000:2404:b0:437:6e55:a736 with SMTP id ffacd0b85a97d-4399dde3046mr20509566f8f.7.1772438907722; Mon, 02 Mar 2026 00:08:27 -0800 (PST) Received: from krava ([2a02:8308:a00c:e200::d99c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75a25dsm25282488f8f.21.2026.03.02.00.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 00:08:27 -0800 (PST) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Mon, 2 Mar 2026 09:08:25 +0100 To: Steven Rostedt Cc: Jiri Olsa , Ihor Solodrai , Florent Revest , Mark Rutland , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Menglong Dong , Song Liu , Kumar Kartikeya Dwivedi Subject: Re: [PATCHv6 bpf-next 9/9] bpf,x86: Use single ftrace_ops for direct calls Message-ID: References: <20251230145010.103439-1-jolsa@kernel.org> <20251230145010.103439-10-jolsa@kernel.org> <1b58ffb2-92ae-433a-ba46-95294d6edea2@linux.dev> <20260228153921.19cd42a6@fedora> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260228153921.19cd42a6@fedora> On Sat, Feb 28, 2026 at 03:39:21PM -0500, Steven Rostedt wrote: > On Fri, 27 Feb 2026 22:24:37 +0100 > Jiri Olsa wrote: > > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > index 827fb9a0bf0d..e333749a5896 100644 > > --- a/kernel/trace/ftrace.c > > +++ b/kernel/trace/ftrace.c > > @@ -6404,7 +6404,9 @@ int update_ftrace_direct_add(struct ftrace_ops *ops, struct ftrace_hash *hash) > > new_filter_hash = old_filter_hash; > > } > > } else { > > As this looks to fix the issue, just add: > > guard(mutex)(&ftrace_lock); > > > + mutex_lock(&ftrace_lock); > > err = ftrace_update_ops(ops, new_filter_hash, EMPTY_HASH); > > + mutex_unlock(&ftrace_lock); > > /* > > * new_filter_hash is dup-ed, so we need to release it anyway, > > * old_filter_hash either stays on error or is already released > > @@ -6530,7 +6532,9 @@ int update_ftrace_direct_del(struct ftrace_ops *ops, struct ftrace_hash *hash) > > ops->func_hash->filter_hash = NULL; > > } > > } else { > > And here too. > > As there's nothing after the comment and before the end of the block. ok, will do.. the original changes: 05dc5e9c1fe1 ("ftrace: Add update_ftrace_direct_add function") 8d2c1233f371 ("ftrace: Add update_ftrace_direct_del function") went through bpf tree, so I'll send the fix the same way, please let me know otherwise thanks, jirka > > -- Steve > > > + mutex_lock(&ftrace_lock); > > err = ftrace_update_ops(ops, new_filter_hash, EMPTY_HASH); > > + mutex_unlock(&ftrace_lock); > > /* > > * new_filter_hash is dup-ed, so we need to release it anyway, > > * old_filter_hash either stays on error or is already released > > > > -- Steve