From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a6-smtp.messagingengine.com (fhigh-a6-smtp.messagingengine.com [103.168.172.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571B13B71C4; Mon, 3 Aug 2026 09:05:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747947; cv=none; b=DfFB5tbSJHtmhxLqi6EzqJAnjyHqiMODcyMG4HJjvV/JnXLXbDBztA1GGoAQKOEWgec2s4ny6t4jvXLPY8X5e3yqzf5JeHu68q9AFNdDRr7E/7cJr983zoIryIScTBoArWmrZE/AnCXbw5S0XfGUkEQjpcQ0ahkyDw9ksGthBm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747947; c=relaxed/simple; bh=NnHtT+b3Qiye4Yp0uUBANizduTZCS8BbwpRtm/Y1De4=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=oBbUkbqptBWW/4qRbZE0AvP1mOsyOsa2hTs7XnAULW1oowYFcFDNGGKT8tu9XSD0DwE5cGVlBgs+Kqw+QWVv/wHBCmJtjpXA8hAwWDF65p0nLO9ibbAV1oztiSIQaR+tnvZWuNck2mwp7Wu4gWG2AFqM2/SatTtCPVXRaVgMNyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=L0KnyfMq; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GMj+2Fse; arc=none smtp.client-ip=103.168.172.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="L0KnyfMq"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GMj+2Fse" Received: from ams-compute-02.internal (ams-compute-02.internal [10.64.2.62]) by mailfhigh.phl.internal (Postfix) with ESMTP id 42AE114000CC; Mon, 3 Aug 2026 05:05:38 -0400 (EDT) Received: from ams-imap-03 ([10.64.2.23]) by ams-compute-02.internal (MEProxy); Mon, 03 Aug 2026 05:05:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1785747938; x=1785834338; bh=NnHtT+b3Qiye4Yp0uUBANizduTZCS8BbwpRtm/Y1De4=; b= L0KnyfMqEanfuLJms+4Htc4y20xWQ8nXZXQymKtiQc4FnDncdS1/2nalkzg1kJGr GPy4CHOC3xieo49RvSZ73DufPtIB0+HRWi1nXrNuIkzsA6dt+kGUO7/+2mLrB7GK 7EddNe49cXkbehL/shOutGkVJLdzVYS0jxxnJF02K4+yvDd0oj5grUYrLhXafBnX QGLwBd0qYWWIkJXqJ1N6QArWFBX0z0Aj6Fpl11Ucco6X3SR7iDPnhHtQ+Ry/Weg4 +SdYcgq9cj2Sl/lYVtuavCU/MGniQzc+drKQ33UwQYWbY7ED45oxsqery4R/9Jh2 gpylNd0D1dfZeg4Hv22W5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1785747938; x= 1785834338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uZMNiCC1WYQpITBqOj+HP2ju2FPGUUTGaPELy3EQ X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id 6A40732A0060; Mon, 3 Aug 2026 05:05:31 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AP-oKdSeCNZ7 Date: Mon, 03 Aug 2026 11:05:11 +0200 From: "Arnd Bergmann" To: moonafterrain@outlook.com, "Madhavan Srinivasan" , "Michael Ellerman" , "Nicholas Piggin" , "Christophe Leroy" , "Paul Mackerras" , "Alexander Viro" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, "Yuhao Jiang" , stable@vger.kernel.org Message-Id: <034d9118-b2b9-4521-88eb-3d88d805834b@app.fastmail.com> In-Reply-To: <20260802-fixes-v1-1-7368423440f4@outlook.com> References: <20260802-fixes-v1-0-7368423440f4@outlook.com> <20260802-fixes-v1-1-7368423440f4@outlook.com> Subject: Re: [PATCH 1/6] powerpc/spufs: fix spu_context leak in coredump Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sun, Aug 2, 2026, at 17:51, Junrui Luo via B4 Relay wrote: > From: Junrui Luo > > coredump_next_context() returns a spu_context with a reference taken by > get_spu_context(), which the caller must drop. > spufs_coredump_extra_notes_size() does so on all of its exits, but > spufs_coredump_extra_notes_write() never calls put_spu_context(), so > every context dumped through elf_coredump_extra_notes_write() leaks a > reference, including on the success path. > > Fix by dropping the reference on each of the three exits of the loop, > mirroring ..._size(). > > Fixes: 38b407be172d ("powerpc/spufs: Rework fcheck() usage") > Reported-by: Yuhao Jiang > Cc: stable@vger.kernel.org > Signed-off-by: Junrui Luo Reviewed-by: Arnd Bergmann