From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 B1C794229BC for ; Fri, 10 Jul 2026 11:56:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783684607; cv=none; b=Iw9u2i7f8RmG0DOgbK8ThmLQswzubpInA7O2WvRAI2VP3JTOquQ+SiwvR/CNP0k5tyr4sJrry52NZ6MBMoPosVTYzaK3ZZ/jMMI15YjE0mPq/gskHxj12lpj9n/XZXB+4/iYZN0z00yADmd9WE90dKrIJOETHn3BvJm/aT4N/zk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783684607; c=relaxed/simple; bh=9TxnLfNYrPWrx2bquvirAzZJUBr6aeku6R42eLdI90k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ev5tpjanPj4wc5RZfRKCQH2F2qe0HlURbffRtN7d0zo6hxcKGBNpCYm0ZXsbdzmlD5/36ehim+CY7rq9FhjByAEdv8WVDDBVNRVp7vh2KP6eoJOywIx651und+uWhbmOCSRXeeuLkHRiBjB7KQzFxTepBRF2c6Gm+AHdpndNjVo= 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=YoEGLZpP; arc=none smtp.client-ip=209.85.221.53 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="YoEGLZpP" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47dec32798aso915176f8f.1 for ; Fri, 10 Jul 2026 04:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783684598; x=1784289398; 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=2Z1QOtUf+44PYKBFhNZsW3TA0rvft+x2B4hitYh+2Yg=; b=YoEGLZpPnGRs1JiNV5e8lo2dZs/yZh0CYvdJz53uvFhAmR4//7obRaYiwW6VHkcTuH pyGQQcu4PbmZoRWn/LwpeWXfyfkEA4Bde1p0J8kfl1V0gle6jLfnZo56zA1oUld/EV35 KwpyWxwMQmSl943lQr8pptPzLLB/N4qFRHvWUXlrxQNiapjDwKonR21NDwsddRYNG2zf 1wmzVCTV+ZKL/VqkV+XiqsCbCd7qTr5xw3hCHzP33ipmQh3x4lneZxFWgogy1pdUBwyR XNFcfznt3CX7LuEgJzZJC1BYShGaIH202T8sw3KeIz2t/HAuj3dbnvsO3jvopucqN52l s0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783684598; x=1784289398; 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=2Z1QOtUf+44PYKBFhNZsW3TA0rvft+x2B4hitYh+2Yg=; b=FEAaMD9gbbB61bhZIzeHTuG8fHaokxPmWwmfobQZjz+mpMio4j+ucK5MNV0I91CyUj OsHaJZ0n4MFNsjXN4XD4bAK7/cFxkg8xFFonyWzZhVaUXJ0s77bOep7OorcdpRKsW+0S 79DA06DIRYFh76kJN1x1nJRAD0q2EXWSiNNOYcSXt5kIdivWWikrquSNlHmKmGhcASTV 4ueE0lityQGLTt57VUuytb+G8BzbJTqz85BCxafitNlW42sJcmp6/YY0bOdi0ncE3vjD 2UywFsuoytjrNZaGW76cZ9cwmSUY/uEiLOKAErrfI1R7AZ7OmB5WaHpONPGlK0PCWGE1 o+PQ== X-Forwarded-Encrypted: i=1; AHgh+RqS4UO6JTTYF/Z+slF9cpDO3VZYl/zuUQuuDiY5ZJoCcRYWAno7xgLGeaLgEFFf6Uw8fGwyD1qR1d7ilxA=@vger.kernel.org X-Gm-Message-State: AOJu0YxfvS86Aapriowt3w0Erwr0u3j5cs9Ev1iMA4NDEa9SC9xk0iQd lJEvZhIJlb6kf8WlKb4vi5jwENzWUqKE5vP8e3kL+XsLW9qAfujacsWobNU4s8iJ4A== X-Gm-Gg: AfdE7ckBm2Kqld1GGYp8xky2nqM0I/8PZ9jQudH1oDLEPBKLDYZsVBwTStN89IryPD5 JP0RNDx6YnT/9YMNddhRbfQMLF8vb/lReAVz38CoFjzFDKWdeVZlVWRi9cMlwoZbiMhyZv+hlxe hZQemLTv77rjQI9z9u88PcjLqMrrNUTy5rpv/uRGxpNxfx6shve8tS/Mv3U/8Xi/0Zjy54YUBu0 5/3Ok3v6x+rt5rbmTo4uDWvB6Tj+7fhwRp3HfPQqqvcNhMPHsq007YqDrZ9M8UWICE1mnPZrRSU 2r/7mm+PsFSeTjOt7VE+dH/NuIyK7oogtT/TLeDvmrXhNHpbCN7b4lML8FzMN06OJk6AeyxVO2L vlRSSMHHpYZV0BofJ5yh0yDFxxSHPuXGwaO+KRSNQdGRhhcRZr82hMt6tRgXffDi8lVbuA+hHxM cS4MyH6Fq/fIGKHphBLLZsobLXwOY9etYR33agd74AR1qGXuBHWLQ= X-Received: by 2002:a5d:59c5:0:b0:474:ad57:1720 with SMTP id ffacd0b85a97d-47df07a561dmr13085174f8f.43.1783684597334; Fri, 10 Jul 2026 04:56:37 -0700 (PDT) Received: from google.com (137.69.77.34.bc.googleusercontent.com. [34.77.69.137]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47a9de1e6ccsm59612780f8f.5.2026.07.10.04.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 04:56:36 -0700 (PDT) Date: Fri, 10 Jul 2026 12:56:32 +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: On Fri, Jul 10, 2026 at 09:01:41AM +0100, Vincent Donnefort wrote: > On Fri, Jul 10, 2026 at 08:58:51AM +0100, Vincent Donnefort wrote: > > 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. > > Ha yes this other one is real too. However this is in arch/arm64/kvm/ so I'll > post it separately to kvmarm. Posted here: https://lore.kernel.org/all/20260710114819.2689386-3-vdonnefort@google.com/ Let me know if I should fold [1] into this series. > > > > > [1] https://lore.kernel.org/all/20260605163825.1762953-2-vdonnefort@google.com/ > > > > > > > > -- Steve