From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 1F797397338 for ; Fri, 10 Jul 2026 08:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783670510; cv=none; b=dIHXbh+ku1+7Qk/6KKruGfF3Z2j0vw5HEfG3i0PvqOr28p7IIYWJR4CZa9PBSOdb9Bh8cE7I34vQIpZKY8vfUkpIJDd5SuDnYhtrulx2QgeK4Oq5S5n1CZb+nhb26InM0cA/Xm1UiYugEhsrttd691RT/x4TtIwi94hY4LnGE0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783670510; c=relaxed/simple; bh=BSxkRfmMCRO+8TnjSjUC17LpujreVv3sfto3dXisocE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tJ3OX8Iez40Ko6upnrzrl94gUASiEkL4td3wkHX4Rz3Tb+Q1ZRvoYMDjCvoBtTlPmfOLhFidHn6wSDN/yogTUO0UScvG7KqNFLbRX1QU52aehr0Rx+JIO2sMgiSGxXUYtsHF+zTk3X+jaIo+gXSHtrD1IAf0TVshXgoeLe4GkNI= 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=FYYOpR/A; arc=none smtp.client-ip=209.85.128.49 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="FYYOpR/A" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-493bc8fda98so3700215e9.0 for ; Fri, 10 Jul 2026 01:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783670506; x=1784275306; 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=ZAZ2MW/yOHMxZoLRacs/O/ZQyGb9jH0iCR+T/PVLRLU=; b=FYYOpR/AbMxpBJ00Imo1qFHFm/kTD3RWFaTN0VKfJoBHGN+ZOuBirpIZdMelcm3tlb /W/r8Om9klndbvYUKA1T0mYIE3/akzVPquDy4lxdkqhqGqxznEUrTO6bR5+tPy16okC3 HZ1zb5O4KFAuKhFWRNGkpIIAXmYadumSXYMvbbhcHcEOPqbfk+xu1h+NaSVoB/tecmyQ aDatiKjQh+Rts0fYGo1YQm7eUv5Q4kiAE8LySXQ0MPID3iQvd2f9rXKPzr9LZ9S8D6e3 8E6VDSf42BMx13HCthcaXkBYuIhusZV75OtkZOSH+3+XkuYyd0vWErm6ACxZ0Wi8dSks SbNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783670506; x=1784275306; 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=ZAZ2MW/yOHMxZoLRacs/O/ZQyGb9jH0iCR+T/PVLRLU=; b=YsJbbKvbweg6YQPBdmlUR7Kf3bgMD9+9kpf+QDKeZ9xMsL3sK6gfFZ6ZcJb2Pfo44Z cK8Bl2Q1Qc3YS/ycDYJOIl5OO+V6+Gbjt04BC4SNN8mkVyQLJhux1Q3ndodWCKx040fN 7ehyn14xJT+I43aaG33Ot0KaK5vqaluwojUBBFDPpxUoY3q/UDfY2JvGMQukEQuoCApD v4EhyIqDlzdO66WmtrpAha7OaDThhhiqOu83l1CJUmUwU7mTwcl+sLdUE17Pnj3NuIwP jztOzGU2J52TnJAQxrtcVG1nrAGgc3TqQqtHvYyjiIpgsnfH5u/QUKNvNJqyiupOA20C ORbw== X-Forwarded-Encrypted: i=1; AHgh+RovOU+KNRhL8/ej+oxKFMNIPDGVDk7kIuAJ/s5tM9sQSLgMpUfo+4irWB/IkCIaLvL8Jpy5HE+4NJg7a2o=@vger.kernel.org X-Gm-Message-State: AOJu0YxQO2XN7EFjR/74XR4LqM1pcJ4vvBHrxYW9SrhMlmyxvWiEpUrd Q5ID49LMUSQa0RfxWpJnfVKgfW8EGhpcT9pJQ7flFobH2nVhneQNoafUC5qL2/Wvnbbe7MR9ISB fG2tJ4g== X-Gm-Gg: AfdE7cktbktRieKvsSp/Md+UxRSJAap9Htp5Kz7VWC4JVDWPcwyinSBhmzdLMqbuya/ A2foQp2440LmyPr5ajLAgJbvVQi6k9OhE1mrOB9P7AHADr7trzVPSFovydZhs3UsnS4+GSTF0yD udl6ZQFE0UcRrezdOzuw7iW+886zp/UCeTw9Etar9gZqdUqSxxTp+84EVq+/0pwH2Sow3tOnRVr XXYNf5zRzRCIvo6eZq/7z6amkini0c0RE4ekhnS0NYslJ3jsdIQK17B6PVIKVLydNOTKtv4VDRO 813hUFAqL7zG7sBvRg8r0TmdJu+ReEvGFzZZ1qUxXOCdjrYGdXZMLRRrPh0U+JKZ3+023RVbzFl Lsdo+psoBaCIRm06csH3DM7EQCYLfzd2tcpbEIC940n16vJWU/hw0oUtf03NdY+46kubACdkX4k WGNFLH0gXEMdg8v3YPaOJ6jld4Hqm8YqV9LV7xyvBobDC+wb9P8Rs= X-Received: by 2002:a05:600c:6d0d:b0:493:b9cd:1272 with SMTP id 5b1f17b1804b1-493e68c40dbmr63251275e9.23.1783670506031; Fri, 10 Jul 2026 01:01:46 -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-493eb742a49sm116592715e9.12.2026.07.10.01.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 01:01:44 -0700 (PDT) Date: Fri, 10 Jul 2026 09:01:41 +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 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. > > [1] https://lore.kernel.org/all/20260605163825.1762953-2-vdonnefort@google.com/ > > > > > -- Steve