All of lore.kernel.org
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: mkl@pengutronix.de
Cc: mailhol@kernel.org, pfink@christ-es.de, eric@evenchick.com,
	max@schneidersoft.net, wg@grandegger.com, kernel@pengutronix.de,
	linux-can@vger.kernel.org, stable@vger.kernel.org,
	kuba@kernel.org
Subject: Re: [PATCH can-next v11 6/9] can: gs_usb: add support for context analysis
Date: Tue, 01 Dec 2026 20:53:24 +0000	[thread overview]
Message-ID: <179615840412.3142.6919158939421503268@kernel.org> (raw)
In-Reply-To: <20261130-gs_usb-fixes-v11-6-3f052bb620d4@pengutronix.de>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The commit message of "can: gs_usb: add support for context
  analysis" describes changes that the patch does not contain.

--

can: gs_usb: add support for context analysis

This commit enables context analysis for the gs_usb driver by setting
CONTEXT_ANALYSIS_gs_usb.o in drivers/net/can/usb/Makefile. It also marks
the tc_snapshot member of struct gs_usb as guarded by tc_lock.

> Tag the hardware timestamp counter infrastructure in struct gs_usb as
> guarded by the tc_lock. Fix the existing annotation for
> gs_usb_timestamp_read(), add context analysis annotation regarding the
> tc_lock to the low level timestamp reading functions.

[Severity: Medium]
Does this paragraph still match the diff? The patch makes only two changes.
In drivers/net/can/usb/Makefile:

  CONTEXT_ANALYSIS_gs_usb.o := y

In struct gs_usb in drivers/net/can/usb/gs_usb.c:

  struct gs_usb_timer tc_snapshot __guarded_by(&tc_lock);

The old __must_hold(&dev->tc_lock) on gs_usb_timestamp_read() seems to be
gone already. It was removed by the previous patch in the series, "can:
gs_usb: fix hardware timestamp state for mixed channels". That leaves no
existing annotation for this patch to fix.

This patch also adds no tc_lock annotation to gs_usb_get_timestamp() or
gs_usb_timestamp_read(). Both functions end up in a sleeping
usb_control_msg_recv(..., GFP_KERNEL), so maybe the intent was something
like __must_not_hold(&parent->tc_lock)?

A grep of gs_usb.c at this commit and at the end of the series finds no
__must_hold, __must_not_hold, __acquires, __releases or __context_unsafe.
The only annotation is the new __guarded_by on tc_snapshot.

The current code does not sleep under tc_lock. gs_usb_timestamp_work()
calls timecounter_read() before gs_usb_timestamp_do_snapshot() takes
write_seqlock_irqsave(). But without a contract on these functions,
context analysis would not catch a later change that calls them inside
the write section.

Only tc_snapshot is tagged, which covers less than "the hardware timestamp
counter infrastructure". Leaving tc_active untagged looks right, because
it is accessed outside tc_lock.

Could the commit message be updated to describe what the patch actually
does? Or were the annotation hunks for the low-level timestamp read
functions meant to be part of this patch?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130-gs_usb-fixes-v11-0-3f052bb620d4%40pengutronix.de

  parent reply	other threads:[~2026-12-01 20:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  7:37 [PATCH can-next v11 0/9] gs_usb: fixes - part 1 Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 1/9] can: gs_usb: gs_usb_probe(): init netdev completely before register_candev() Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 2/9] can: gs_usb: gs_usb_receive_bulk_callback(): update state even if SKB allocations fails Marc Kleine-Budde
2026-11-30  7:45   ` sashiko-bot
2026-11-30  8:04     ` Marc Kleine-Budde
2026-12-01 20:53   ` netdev-bot+sashiko
2026-12-01 20:56     ` Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 3/9] can: gs_usb: gs_usb_receive_bulk_callback(): check for overflow flag if SKB allocation fails Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 4/9] can: gs_usb: gs_usb_receive_bulk_callback(): add missing call to can_rx_offload_irq_finish Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 5/9] can: gs_usb: fix hardware timestamp state for mixed channels Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 6/9] can: gs_usb: add support for context analysis Marc Kleine-Budde
2026-11-30  7:44   ` sashiko-bot
2026-12-01 20:53   ` netdev-bot+sashiko [this message]
2026-11-30  7:37 ` [PATCH can-next v11 7/9] can: gs_usb: gs_make_candev(): check can_rx_offload_add_manual() return value Marc Kleine-Budde
2026-11-30  7:37 ` [PATCH can-next v11 8/9] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info messages Marc Kleine-Budde
2026-12-01 20:53   ` netdev-bot+sashiko
2026-11-30  7:37 ` [PATCH can-next v11 9/9] can: gs_usb: gs_usb_receive_bulk_callback(): emit error message on invalid channel instead of disconnecting interfaces Marc Kleine-Budde
2026-12-01 20:53   ` netdev-bot+sashiko

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=179615840412.3142.6919158939421503268@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=eric@evenchick.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=max@schneidersoft.net \
    --cc=mkl@pengutronix.de \
    --cc=pfink@christ-es.de \
    --cc=stable@vger.kernel.org \
    --cc=wg@grandegger.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.