From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796035587; b=bSv7MZLTtnKgh8SvlMBtFH0dhO/pt6n0Ip4FSr1o59TDpCKbD3GpEsNayN8Sjvz0LaD1 goe83k+Bn8DJ16QxmWIF9nOK3IviOg/X3BD/ieEc6WAwO7A+tZhEi76kHAaGxzSYqeNSU IFmYS/7co3a5ShDjiW7bs7TbXlMck0H7iF+NPFKSYQ5O70S6D0mzIeVfGEnZTa2Gh5wax YJh3wa1fykBj5swZ+ffFr4WXyG4BFIxQknrpAebCpoDE8SwRNFiJFe/llVKbyoKoaXvuE 39wY1olSfF85Dt1J0OBooMhExaiqqA+kx531yzJLoJU9Ilypj1wJRsTp7nMM5r++3og== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796035587; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=cBFei1//0WzEgEdpv8gCxeOda/lSEIckBMt1M/5DAwA=; b=pV0Gi2oiRJhsC/9cW0UeW2fZjegAz90zxPfegpdUMiSd3NeyPLFRkTVcyGSpg1A62Y1k n7Y6qDCCaXYW7STUUVNBrw+yLfNoBX/sfVuWwa/UvjKfdVrrRSC35slahRD7u4djuXdun tPrkRJ1HiviP1q6gmNQe5lU7pyY9HK2RAutZ9tGjJV29D9E4txKvRMgSBeB9mSJOVfJvO 1L7Vn+GcIxOEx8KM3OD9LQC9+2d8ETZlKoATO9+2O+Yn8vCbmlJ9lr19mC+ss7quArcbD kLuNACAkeZRpdjLR9OFSy4+RMnr6UMn+8849p3HyimWAhFLLIA4KpMyRum1CKBwHpSw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Juc8NJvp; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72D6B606A325 for ; Mon, 30 Nov 2026 10:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Juc8NJvp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 818E71F00896; Mon, 30 Nov 2026 10:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796035586; bh=cBFei1//0WzEgEdpv8gCxeOda/lSEIckBMt1M/5DAwA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Juc8NJvp9hW9/H24aLSxHWfeVVNv6hTGVIapDZTpk+acmk+Cbi30PPfvkXbgxEThR XwzWHvXk04Cg7zH2k+RFxEfF6YUq9BE+8vJYW0O8v0FDRuNKRlWe581dFarEjuC77T F4zCaVQnqgCv1NIWNQUykfO5MND83Wi7f+jeHg2j0OGf05a2I/Ts/Wp5sMTH7p+2hp iJvTxmWqPQNMA0Ymc9d3EkxfdjNZN3lsZOcr5S2HHX2G/Op0WFw8Pyf6FNdaI9ZT58 oqrtyuBofrFNHhd1tccdJwj1TNvtwRAcJjBqZFKhrJv8MKqxtu7Kza/WFiwceX1nlf 0SEDkJKcfp6cA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/2] usb: gadget: m66592-udc: recheck ep->queue after reacquiring lock Reply-To: sashiko-reviews@lists.linux.dev To: "Ziheng Wei" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261130103438.1384118-1-zihengw03@163.com> References: <20261130103438.1384118-1-zihengw03@163.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 10:46:26 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] usb: gadget: m66592-udc: missing Fixes trailer for transfer_complete() fix -- commit 40f941bfe13761b7a5dce12306fa96681696cfdf Author: Ziheng Wei > usb: gadget: m66592-udc: recheck ep->queue after reacquiring lock > > In transfer_complete(), restart is computed from !list_empty(&ep->queue) > before dropping ep->m66592->lock for usb_gadget_giveback_request(). While > unlocked, the completion callback or a concurrent m66592_dequeue() can > empty ep->queue while ep->ep.desc remains set, causing list_entry() to > pass a bogus pointer to start_packet() once the lock is reacquired. > > Recheck !list_empty(&ep->queue) after reacquiring ep->m66592->lock. > > Found by LLM-assisted static analysis and runtime-tested in QEMU+KASAN > (null-ptr-deref Oops in start_packet() before the fix; 0 findings after). > > Signed-off-by: Ziheng Wei [Severity: Low] This fixes a bug in transfer_complete(). Should it include a Fixes: tag: Fixes: 4cf2503c6801 ("USB: m66592-udc: peripheral controller driver for M= 66592") or for the commit that added the unlock/relock around the completion callback: Fixes: 598f22e11bef ("USB: m66592-udc: fixes some problems") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130103438.1384= 118-1-zihengw03@163.com?part=3D1