From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 56A5B43746C; Mon, 17 Aug 2026 14:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786976981; cv=none; b=lLW+Sp5CmQunmUABW1s/0H92LjbCbC6y5FIFkCG+YZPqe/n4T91ZIbtpmmQz5z6sfrtWHw3khVsCoaMjrDqWGx2J9U6fQH+jQEXK0FfKTA0CmtYDUNd7ayoLEbi+GyaxjpgOLB+PA70tTXLfb8RtbWDO52h9EdVX6QDqe7893ao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786976981; c=relaxed/simple; bh=7CwRmfzBU/s38lB8FMW89X2/RUNGtNIHwE2XyqVCe0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GqWCWqkqn1UEbWwqJoMgMHFW7WkXVW/59qCPT61i2BBWU37PZt520Bxa4t9FrpudcOXB9A1v+x7Kf8o9Ha0aGecy8TwEVauausApu9bKiJH1UgJRve+G/L/5XDD8xQQPAu0oERFqpemU/uM6qoEm07LGw/dxLK0Rx447eLpBcJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DHwm3JSe; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DHwm3JSe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A95381F000E9; Mon, 17 Aug 2026 14:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786976980; bh=HaK9+Rc2jJy3OVBsksCOFUzQrrNX0RmOV06S/4i7v6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DHwm3JSeDE/swWXtN4ScUvff1Cfo9Xh2NZdAILXMXqMm+9rLN2gWMlneSb3vhyeXf H7z5lhdPntbkYDnXh0RJc3xEQCtLPjXt3cJ3UhHvoRxYH7Q9aajlj5k970jTUqqMRE +b1O/zzF4X/Exb52uIYm1e7BZYMSr3Hq4tEu0HDQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Danilo Krummrich Subject: [PATCH 5.15 144/456] drm/nouveau/acr: fix missing nvkm_done() in error path of nvkm_acr_oneinit() Date: Mon, 17 Aug 2026 15:28:54 +0200 Message-ID: <20260817132545.716231823@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132539.792407575@linuxfoundation.org> References: <20260817132539.792407575@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wentao Liang commit c3027973f692077a1b66a9fb26d6a7c46c0dc72c upstream. In nvkm_acr_oneinit(), nvkm_kmap(acr->wpr) is invoked unconditionally at line 309 to obtain a mapping reference. Additionally, when both acr->wpr_fw and acr->wpr_comp are present, a second nvkm_kmap() is called inside the conditional block. Both mappings are expected to be released by nvkm_done(acr->wpr) at line 320 before the function returns successfully. However, when a mismatch is detected during the loop within the conditional block, the function returns -EINVAL at line 318 without calling nvkm_done(). This results in a leak of the kmap reference(s) acquired earlier. Fix the issue by invoking nvkm_done(acr->wpr) prior to the early return to ensure proper release of the mapping references. Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260606155606.77593-1-vulab@iscas.ac.cn Signed-off-by: Danilo Krummrich Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c @@ -314,6 +314,7 @@ nvkm_acr_oneinit(struct nvkm_subdev *sub i, us, fw); } } + nvkm_done(acr->wpr); return -EINVAL; } nvkm_done(acr->wpr);