From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 B0DD63D1AB7 for ; Fri, 10 Jul 2026 07:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783670342; cv=none; b=QNCTKf591ckQvxqqXAzy7WplA1zWCyxIMgh4vsVk6j/HpWI1dtIxsJBa27feOPy4NANsKywp/H9DTBeSkqhE4O3lNnQMGbyuHL4TzUUfudYH6gvOc0XH9BBkq1ETUdwuoRRocuwYDR9yiTxye4at0LQ3cIHX0rICMzxPJsFTmgw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783670342; c=relaxed/simple; bh=AZOVdK4KCiMCbqBmB8VfLClAg517289sET3fT5UBE0s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QSW9T1Tt0WrIkRw8DKEc4FZS7pOlrFy/BMnENt5LHCVi1iL/1+Ly6fEI2zw87zyoP60mozevk1Y9mhEy1L+1L7qAHehpH5PGP8bageuHbBHmx6nhBFfrt3c4v+2P9W+5NJ/+oRnw91h6nAO7NvNaqt3mBiS96d6Z1E6LuXIUDvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UBY+CYM1; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UBY+CYM1" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-493d92b7db3so5698425e9.2 for ; Fri, 10 Jul 2026 00:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783670339; x=1784275139; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=o5q0arahAtJRDOJ0dtbcAGXiTRsBAWSSsiAf5jwEM58=; b=UBY+CYM1KZTOvp0cPyLUVyqi6yts3zidAhVyF4omaKuFXqhLpYtelrBNmVa+1wPxf8 mzqIUSLxT+wtAFkQX50vMhiGsmyDisG7jJI2jozR9F4yaY38w6QBH7psRp7u4G0hsPyO bEBSfOuLxEZZ0KttMS9mKdspxOShnXMQ07EVWcaseOdcEsHzVrppC0zs1ilsy0weP4vY eVk8gCvFyO2H7Ti/IQey0e95qkO9iTEzxQxicYDxhWFzbDygw1AP2/csQsun7zEvQVR7 WgTMRDuJViJbWR7tbPZqewf4oD1zBbhYqY419wJgE0zZiYMhJzwpFBBqfwzA8c4fBkJJ g04A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783670339; x=1784275139; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=o5q0arahAtJRDOJ0dtbcAGXiTRsBAWSSsiAf5jwEM58=; b=RQAsTQ3fTHFcZ2QRix3QKXkPj31L8Jcu7B7nVwochKfT52USPMSVsftK+itZ7KlSBQ dk21L4HP8C8c4ABjG5mEmJq/zo6lF6vN2FmYabfLpRhR7gbZn/w6BpanRdwWuE+KBM3l OmwLyCvmBR3FPZuYM/rpXZbOQcJ233LgevcAo9g1E2lKCWkYUR0XedZvBN2gZ+8bR40G 0mHrrxLeq/ufkA5CpqEwCu+k4+ErFNGoPzHAiZ9ThmAK9ncxufoWeKgBw70nQpbj663I TT98I8+QmUQ8eqvT2OTsgDo8cIuNtzgum9iFrFspgygzgJs9GnVs3gEvwbdNEbhF6U7q dpBA== X-Forwarded-Encrypted: i=1; AHgh+Rrd7P9sqVXwHtIBGd2Qs6Ah7GLE4OVbr8AtLPz4wKUyVp2aijSzHl8r4ubWojsrgr3MuJt/0nDz/GMWMDA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywc1CtXiI5E7IJbzGVpHMuMkSYNXD+odTOSqF/fsFfrrwPT3Y8R clOmmS9I5gj5jG+M3V1EIMVluJV4thsCrmwnZlQzRKvbwj1qkBdj9al1GjFKEHUCOuB4/JoJHB3 8IZRLeQ== X-Gm-Gg: AfdE7ckkcaV2W9sdgyWyhJZ6SYSrRksILvAh+4K00Az7UOn2UwzmXP6NSOl67ow97M4 PNVqMPZsd+fpHoFzVXgs+FnAkcF28hQnpaTRzWe34MelgYtAvrS/kVIPQlNsTXzGI9885fhOnCh ElwVFIWUivI22MDCIb9LraBaIxRv7cFjgN2n3THLmclDoghyxCZYqagee0iGJOfnzOL1eJ6Si7f D6jesGTF6mVJLTTHlsM0ifBPHQNPr/0gECi7+4JkEkuRm+2cQk2gsWm053g7E0abFCr7Tz6wuAY 7/UOETe6LvZlj23WuhIIxnhTxguiyFmt7S+uZ/1FXqKM7dfW731uGNfpUN+CRLVQqlxgoZZ+bwA Urg2u1LtFTH+n5LEOsMuhQo7WNcQ6Cm+oAi19y60uUDsx+RbdnN/6IiAB/uzmXVHLJbtnDgagYF HuAUCMoADeZycl6N3j7cw8ez/uEQvE23kkKx1RXEAS/RluN9j9psg= X-Received: by 2002:a05:600c:4747:b0:493:f0f5:f2d7 with SMTP id 5b1f17b1804b1-493f0f5f374mr35237235e9.7.1783670336428; Fri, 10 Jul 2026 00:58:56 -0700 (PDT) Received: from google.com (137.69.77.34.bc.googleusercontent.com. [34.77.69.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493eb670a41sm115777085e9.0.2026.07.10.00.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 00:58:55 -0700 (PDT) Date: Fri, 10 Jul 2026 08:58:51 +0100 From: Vincent Donnefort To: Steven Rostedt Cc: mhiramat@kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, kernel-team@android.com, linux-kernel@vger.kernel.org, Sashiko Subject: Re: [PATCH v2 1/3] tracing/remotes: Fix leak in trace_remote_alloc_buffer() error path Message-ID: References: <20260709160017.1729517-1-vdonnefort@google.com> <20260709160017.1729517-2-vdonnefort@google.com> <20260709191516.7a7ad6f6@gandalf.local.home> 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: <20260709191516.7a7ad6f6@gandalf.local.home> On Thu, Jul 09, 2026 at 07:15:16PM -0400, Steven Rostedt wrote: > On Thu, 9 Jul 2026 17:00:15 +0100 > Vincent Donnefort wrote: > > > If page allocation fails in trace_remote_alloc_buffer(), desc->nr_cpus > > is not yet incremented for the current CPU. As a consequence, on error, > > half-allocated rb_desc will not be freed in trace_remote_free_buffer(). > > > > Increment desc->nr_cpus as soon as the first allocation for the current > > CPU has succeeded. > > > > Fixes: 96e43537af54 ("tracing: Introduce trace remotes") > > Reported-by: Sashiko > > Signed-off-by: Vincent Donnefort > > This patch makes Sashiko find other possible issues with the code :-p > > https://sashiko.dev/#/patchset/20260709160017.1729517-2-vdonnefort%40google.com So one of them is fixed as part of "tracing/remotes: Add printk, dump_on_panic and boot parameters" [1]. I can pull those fixes into this series instead. I'll look at the rest. [1] https://lore.kernel.org/all/20260605163825.1762953-2-vdonnefort@google.com/ > > -- Steve