From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 0F8DA357D05 for ; Sat, 13 Jun 2026 07:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781337045; cv=none; b=pCroLYuqcwcoaqNLHQMGCEsN9MRp23JNkzPxNt5iC0yLNs/CWfIpfyBg29H4Ksdj+h99LujIfBlO6K4cjziE7gaBiAGXnoepLdh0ndnow/9DfOxdb7DfS8/R0uwR2yQViDiqzNlQxxg9QZqi4SFOQ2mr/Ah2WwvmZAQE9ZMBRzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781337045; c=relaxed/simple; bh=nFJnphqUQG5wieQkJ7Kb9J+Gt5X/QP0brHiBPfCW6d4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GrQaNUg3kwKcqz1bRiOoW0hryyrphunwxe9GBgOc034+Stzxk0+hcp1AcW4r3wy1J0ca0jfnfv8wCUSOk6llVLhOGyaMhPXoIpbO3DNL0d3rGG32iH6f3TfeAfLD4wEz8i6wi39cfrYjE2AGS9DyALYEmx637MopACW2pWtLa6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ryd7iyCI; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ryd7iyCI" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-491609cdd8fso7844195e9.2 for ; Sat, 13 Jun 2026 00:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781337042; x=1781941842; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mlm0YHGLM0VfFF/fXJEvgkWs1yTQHLEduURYTbkabJ8=; b=ryd7iyCIeu7cuAs5mNY/PwWNKIC4b0xWZpWTdYN3aT33Ak+ve1k6PNhrAtHKwTxyB9 0z3ZKLLmhny0in//j5dlgsqWzWPVIc6qRuBTXB4TFJrzUIUXC1fMSTIJIo955QFLzJbH byes3VClwjAct5zbB4QCEq+pjHyLOSP0VW1A6mCjZHkyb3keed2O9dq4TzyyKEctkFYS BL0d8jXbbMUeKfD05BSKT87gFYXGg/MBjztxNi6BVcUQPshNCf5QWYV5rGSJnGL4QP2V ZLISsrkLytodX9oCzsEvKru6H+UYebF9idbMqyUAqDaCVRgJlgJrPJU8vlr6Vja21PEj vBVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781337042; x=1781941842; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Mlm0YHGLM0VfFF/fXJEvgkWs1yTQHLEduURYTbkabJ8=; b=bSbQQSkROI2Fq1A1qjf6YpQFTtycjQPsSucJ/QpiZ86UWSGcOtBh1DBqDFdyOu9j0g mVl9+wtwgmAmHFkMUIiSs6c+58DktDEYM8J/Qu5Wz+01m2vsOjHQ9vRJt1qJgyHej3Xx Vw7q6Wvr0VXoHaj3vuWAnf9y8469/dChkCPIgky+d19g+rcMnIOJi8O6B7vL0yHbtMJo RPJZdRpHhQSWnWJi5hjUlXIMbCOzR5P3qtBtUC6lvfA9EgFgyywesFXdLowPH1FNG+wF 2NDHhU7j933dYyvwQNFxLcB7YVnKqaBSkMwC61mMGd3K4Xr6oc1HqdDw2fggSFXaH2OH u3RQ== X-Forwarded-Encrypted: i=1; AFNElJ+7Ai7pUeDnI+UoXeG6AUmle4YNRWLtBQDO4Gp8LNjOOrAPVZxgeJj8mWipbISLvd0KjTp8/yxUp8/u6Kg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxd1Bh0U3mBxRi/qdAdhP4NoYSE0o3T6ufUYG6RyR8RDF6QofuG yGUexoKytN34jCJPhS0SVcJRFdkLilGW3IM0VyZFhF2T8VrmmPA3q+yv X-Gm-Gg: Acq92OG60zK02GuPoYxb2zVc485C1lCOLPjWJIQpAp62otIqy5hLkL1juAdP2YuPG0j f5sNpyKvBvZa/htQFBTfuyjZlskGqxKmN8P0u4RoCua2k6YPs7MGvNlgmkKfFmtgr9ViR89aE6H ldRuOUMW4FCRR8rzLbO6N5F3jT90helx4Lhx3K9pVQkuuHqNnrNJ9YOHouZYFAKY56gTqLLsVlI G+jyzZ6X/dyPqaLB3Vl0mZejJS/NYmu6P+ikBlcKs3fh4Ky4FswSl3v3lpzcGyyd3e8yTZCItgs W8Y4iITvuOcoiGS+1H1f1kskTJwFOiVAKe1fpHQ9/b9hkkkGLL0bP7SS//SS9mjTlmZqI9/wWZ9 t9ZVcGaWjd51+TD+bJlgpW81ZPd6rL3HKQ5da15J0i854ILV5HeDs/KOKREE8q7QEQhOuXxu/12 pEairOBbyoZYRFWx5fhcwPGwLqPrkg+02utXVJjFtcIzTE X-Received: by 2002:a05:600c:820c:b0:490:5cd8:d213 with SMTP id 5b1f17b1804b1-490ec4d3407mr76769065e9.15.1781337042183; Sat, 13 Jun 2026 00:50:42 -0700 (PDT) Received: from jernej-laptop.localnet ([188.159.248.16]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490ea4a128csm145232805e9.0.2026.06.13.00.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2026 00:50:41 -0700 (PDT) From: Jernej =?UTF-8?B?xaBrcmFiZWM=?= To: wens@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, samuel@sholland.org, Wentao Liang Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Wentao Liang , stable@vger.kernel.org Subject: Re: [PATCH] drm/sun4i: fix refcount leak in sun4i_backend_init_sat() Date: Sat, 13 Jun 2026 09:50:40 +0200 Message-ID: In-Reply-To: <20260607030950.83636-1-vulab@iscas.ac.cn> References: <20260607030950.83636-1-vulab@iscas.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dne nedelja, 7. junij 2026 ob 05:09:50 Srednjeevropski poletni =C4=8Das je = Wentao Liang napisal(a): > When sun4i_backend_init_sat() calls reset_control_deassert() it > increments the deassert_count of the reset controller, and must > pair that with a reset_control_assert() call to decrement it. > In the error path where clk_prepare_enable() fails, the function > returns immediately without calling reset_control_assert(), leaking > the reference count. Other error paths, like the devm_clk_get() > failure, correctly jump to the err_assert_reset label which performs > the missing assert. >=20 > Fix the leak by using the existing err_assert_reset label in the > clk_prepare_enable error path instead of returning directly. >=20 > Cc: stable@vger.kernel.org > Fixes: 440d2c7b127a ("drm/sun4i: backend: Handle the SAT") > Signed-off-by: Wentao Liang Reviewed-by: Jernej Skrabec Best regards, Jernej