From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 7A70134D907 for ; Mon, 23 Feb 2026 11:28:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771846120; cv=none; b=qaPTWjSUGbCfrerg33QVDdi96BFtQQAbBgTR+kVjtffZHcnu1+LLBgddCiSSwbDOjrQgGR1OHIfrT7CGE+J9JVheAXp8N4xioF8/C7NUsTsAa54A/3L6eHFer8RmlfRr6JQngFdJ5z7xnwD1GywBBVx90k+0IgWeT/rvprVJ5aA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771846120; c=relaxed/simple; bh=iSHHhMjMZF7RXJsBUUXnux7uDb9JH64aVuAfJn7+uUI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ig5j1cpn3/sNErhmb9ikxnNnSEJtkgMWggUWGD+QkCShHJsWdb8YeRmCXyuZD5Lhvd0rLVui6c7ZFIjCJmiXQTkAT1PCa3IVeVeWQPsXGjzDaiNtB/0ASnwrMCyqbksykJt1CI9QkuAPWbyBr3g2vv6rlQeqLiTUFsxX5D0n1yI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=JdhfICLj; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="JdhfICLj" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4836f4cbe0bso31515895e9.3 for ; Mon, 23 Feb 2026 03:28:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1771846117; x=1772450917; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=vw1XJzi7PNud+gbo9kf7Wo2OGF9SzPqZe0XTmLwxs4A=; b=JdhfICLj4VtdiVo6AF/CNwu9tZfOrGloqAQo0/88Eopu7qwrTQroBpwwwMg8PbQtP9 2RgBlkm/geGaOz00QsFkgPKmj3Cbg35ozQjTAJtU+DKH7YDWI4W1Szf1ApeyEFPyxM1U bPeUXtZ5pepabTbgpeVgbyQNpYuWJPENPqh4ZBsZYwdI4+8+lARzrHtaGT9b3XspdFcU Ga1HBdVJSb9h7u7eYz97bWwEPcu3KjLQJDiEN+/vzdAZSIR8qmBWBlL2f5durvKu+nZA jFBCrJl0t0eUevaomZpemCVkgOrsrCxLDV1nrC0FC7Rp8fAdDUQQFsW4aRafVop5DgMy tZqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771846117; x=1772450917; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vw1XJzi7PNud+gbo9kf7Wo2OGF9SzPqZe0XTmLwxs4A=; b=JhCla0eXCRLpXbxKVH1mp/Kk9awiUFCFia4xOhTV7NtKbmyku6OgNwd8OQHh9oPPV5 nSUnKb9B8MYt2WS0SaRukxOQbUXbxSgR7JTw7BjSQLeeX69BYzvrsrVC98brAw1+dV9g o35riR0J5M2e9K5q5w3ESkwsQHPWLGPbhake0puuxv077OZ0+PQD/c5gXs4pF5IFqcuP fUrQKWwV7cgskb6EHJQ+GDrJ11OaiMt5hZjbtLfuTxsDuQn6gTZKzkAzQWIHu46PC0NI 6fDqopnIznpLfpIhd44kaDRbryztOhnHpI7qiD7WMMTYgVa9Wb247rsnHcbQs0EYhtKV 7t1w== X-Gm-Message-State: AOJu0Yw4JfBUdTijZaLXonhB9b2B812eW/POpzmFNttLpStm2Jbc73BS qVDcwEwf2KgiJLrpo5R8mqkD9P99T7X/V4QAEQw+ZKGqfZ+6Q4PmYlSJUJhUqcuD4MI= X-Gm-Gg: AZuq6aJ45a9esXcJPCTZxRsh/PmTlL1M73pcb2aLI4Q7hJvEX3+WMO+w8E4uwcsQXQO OMLKf2Uu0Ud0eg14OmP8AD2uUCfxbjS38o/qNMb5/TBAiZBQKoLSNLrvD0rEBrLqe3VBcmNN44E fqTvrlEp7E2ggCAC096BPCIkB9p8JYsauK61M6AxI8KaAQPADIR5JC9YckyHkrqpmMllhiVE16s f6wu4v5WdrGPz+g8ZrNw+sNSMRzMaP42dQHXGNp8ftCFeenOHrxBlamRebtGKp207IQO13XAtKq UMMYWzOVXLMjD+Z3yZPb49XWty6Q+IoNzMKXFRw9gEIo7OeXwDphGUmPtiTn7J0umH+TgfshQEr oItWjkK2XSHFoMYdyidogX7spHPxKZE3SEtbyWT1YwpHF6dypokIqCXGGc+J+TAXtD8l7oRynD5 zzeL93b43KxGbAdc/prtImIRwQgISOij/hzDsTYbqKDbU1qDa8XglZTK+FAuNoWo0oJCw= X-Received: by 2002:a05:600c:190f:b0:477:9a28:b0a4 with SMTP id 5b1f17b1804b1-483a95574c5mr137098695e9.0.1771846116804; Mon, 23 Feb 2026 03:28:36 -0800 (PST) Received: from ?IPV6:2001:a61:13fe:e401:a6d6:a7a0:a277:a99e? ([2001:a61:13fe:e401:a6d6:a7a0:a277:a99e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a31b3d88sm281193455e9.3.2026.02.23.03.28.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Feb 2026 03:28:36 -0800 (PST) Message-ID: <04778e0c-e15c-4acd-ade2-5cb8dc4319b1@suse.com> Date: Mon, 23 Feb 2026 12:28:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] usb: misc: uss720: properly clean up reference in uss720_probe() To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, stable References: <2026022327-exhaust-constrain-e21d@gregkh> Content-Language: en-US From: Oliver Neukum In-Reply-To: <2026022327-exhaust-constrain-e21d@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 23.02.26 12:17, Greg Kroah-Hartman wrote: > If get_1284_register() fails, the usb device reference count is > incorrect and needs to be properly dropped before returning. > > Cc: stable > Assisted-by: gkh_clanker_2000 > Signed-off-by: Greg Kroah-Hartman > --- > v2: properly clean up the previously allocated resources by jumping to > the error path and not just retrning directly > > drivers/usb/misc/uss720.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c > index ec8bd968c4de..54107bf280df 100644 > --- a/drivers/usb/misc/uss720.c > +++ b/drivers/usb/misc/uss720.c > @@ -735,8 +735,10 @@ static int uss720_probe(struct usb_interface *intf, > * here. */ > ret = get_1284_register(pp, 0, ®, GFP_KERNEL); > dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg); > - if (ret < 0) > - return ret; > + if (ret < 0) { > + usb_put_dev(usbdev); > + goto probe_abort; This jumps to probe_abort, which calls destroy_priv() indirectly via kref_put(). Either that works, which would mean that you must _not_ do a second usb_put_dev() or it does not, in which case the earlier error handling for parport_register_port() is incorrect. Either way, there is a problem. Regards Oliver