All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: gadget: r8a66597-udc: recheck ep->queue after reacquiring lock
Date: Mon, 30 Nov 2026 10:40:08 +0000	[thread overview]
Message-ID: <sashiko-outbox-240873@kernel.org> (raw)
In-Reply-To: <20261130103438.1384118-2-zihengw03@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: gadget: r8a66597-udc: missing Fixes trailer for
  transfer_complete() fix
--

commit 3db6fa5568a80723302de3c2c0e6ef4b095fb055
Author: Ziheng Wei <zihengw03@163.com>

> usb: gadget: r8a66597-udc: recheck ep->queue after reacquiring lock
>
> In transfer_complete(), restart is computed from !list_empty(&ep->queue)
> before dropping ep->r8a66597->lock for usb_gadget_giveback_request().
> While unlocked, the completion callback or a concurrent r8a66597_dequeue()
> can empty ep->queue while ep->ep.desc remains set, causing
> get_request_from_ep() to pass a bogus pointer to start_packet().
>
> Recheck !list_empty(&ep->queue) after reacquiring ep->r8a66597->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 <zihengw03@163.com>

[Severity: Low]
Since this fixes a bug in transfer_complete() present since the driver was
added, should the commit message include a Fixes tag?

  Fixes: c41442474a26 ("usb: gadget: R8A66597 peripheral controller support.")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130103438.1384118-1-zihengw03@163.com?part=2

  reply	other threads:[~2026-11-30 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 10:34 [PATCH 1/2] usb: gadget: m66592-udc: recheck ep->queue after reacquiring lock Ziheng Wei
2026-11-30 10:34 ` [PATCH 2/2] usb: gadget: r8a66597-udc: " Ziheng Wei
2026-11-30 10:40   ` sashiko-bot [this message]
2026-11-30 10:46 ` [PATCH 1/2] usb: gadget: m66592-udc: " sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-240873@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zihengw03@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.