All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mike Lothian" <mike@fireburn.co.uk>
Cc: dri-devel@lists.freedesktop.org, ojeda@kernel.org
Subject: Re: [RFC PATCH 1/7] drm/vino: add DisplayLink DL3 dock skeleton and plaintext bring-up
Date: Wed, 17 Jun 2026 20:11:40 +0000	[thread overview]
Message-ID: <20260617201140.C15811F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260617151249.2937-2-mike@fireburn.co.uk>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The driver enqueues a `BringUp` work item to the system workqueue but does not save a handle to it, making it impossible to cancel during `disconnect()`.
- [Medium] Overly restrictive Kconfig dependency (`depends on USB = y`) prevents building the driver as a module when the USB subsystem is modular.
--

commit c4faf8ad941311cd06fad312c6e36a39253115df
Author: Mike Lothian <mike@fireburn.co.uk>

drm/vino: add DisplayLink DL3 dock skeleton and plaintext bring-up

Adds a clean-room, in-kernel Rust DRM driver for DisplayLink DL3 USB docks
(Dell Universal Dock D6000). This first patch registers a usb::Driver, binds
the control interface, and runs the plaintext connect handshake on a
workqueue.

> diff --git a/drivers/gpu/drm/vino/Kconfig b/drivers/gpu/drm/vino/Kconfig
> new file mode 100644
> index 0000000000000..234ce92736e43
> --- /dev/null
> +++ b/drivers/gpu/drm/vino/Kconfig
> @@ -0,0 +1,21 @@
> +# SPDX-License-Identifier: GPL-2.0
> +config DRM_VINO
> +	tristate "DisplayLink DL3 (Vino) open driver"
> +	depends on USB = y

[Severity: Medium]
Does this strict dependency prevent the driver from being built as a module
on standard distribution kernels?

Using "depends on USB" instead of "depends on USB = y" would allow this
module to be compiled when the USB subsystem is also built as a module.

[ ... ]
> diff --git a/drivers/gpu/drm/vino/vino.rs b/drivers/gpu/drm/vino/vino.rs
> new file mode 100644
> index 0000000000000..79f446041b648
> --- /dev/null
> +++ b/drivers/gpu/drm/vino/vino.rs
[ ... ]
> +        let intf_ref: ARef<usb::Interface> = intf.into();
> +        match BringUp::new(intf_ref.clone()) {
> +            Ok(work) => {
> +                let _ = workqueue::system().enqueue(work);

[Severity: High]
Does this code leak the enqueued work item handle?

Because the returned handle isn't stored in the driver's struct, it becomes
impossible to cancel this work item later during device disconnection.

> +                dev_info!(cdev, "vino: bring-up queued on system workqueue\n");
> +            }
> +            Err(e) => dev_info!(cdev, "vino: failed to queue bring-up ({e:?}) -- WIP\n"),
> +        }
> +
> +        Ok(Self { _intf: intf_ref })
> +    }
> +
> +    fn disconnect<'bound>(intf: &'bound usb::Interface<Core<'_>>, _data: Pin<&Self>) {
> +        let dev: &device::Device<Core<'_>> = intf.as_ref();
> +        dev_info!(dev, "vino: D6000 disconnected\n");
> +    }

[Severity: High]
Can this lead to a use-after-free panic if the module is unloaded while the
work item is still pending?

Since the work item isn't flushed or canceled here in disconnect(), the
workqueue might attempt to execute the work item's run function after the
module's code segment has been unmapped.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260617151249.2937-1-mike@fireburn.co.uk?part=1

  parent reply	other threads:[~2026-06-17 20:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 15:12 [RFC PATCH 0/7] drm/vino: DisplayLink DL3 dock driver (RFC, help wanted) Mike Lothian
2026-06-17 15:12 ` [RFC PATCH 1/7] drm/vino: add DisplayLink DL3 dock skeleton and plaintext bring-up Mike Lothian
2026-06-17 15:17   ` Miguel Ojeda
2026-06-17 20:11   ` sashiko-bot [this message]
2026-06-17 15:12 ` [RFC PATCH 2/7] drm/vino: add the clean-room HDCP 2.2 AKE/LC/SKE Mike Lothian
2026-06-17 16:18   ` Eric Biggers
2026-06-17 20:12   ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 3/7] drm/vino: add the AES-CTR/AES-CMAC control-plane seal and arm Mike Lothian
2026-06-17 20:15   ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 4/7] drm/vino: add the Vino (RawRl mode-2) framebuffer codec Mike Lothian
2026-06-17 20:13   ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 5/7] drm/vino: register a DRM/KMS device and scan out to EP08 Mike Lothian
2026-06-17 20:22   ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 6/7] drm/vino: add DDC/CI brightness/contrast, DPMS power and DFU info Mike Lothian
2026-06-17 20:19   ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 7/7] drm/vino: add KUnit self-tests for the protocol and crypto paths Mike Lothian
2026-06-17 20:18   ` sashiko-bot
2026-06-17 15:55 ` [RFC PATCH 0/7] drm/vino: DisplayLink DL3 dock driver (RFC, help wanted) Danilo Krummrich
2026-06-17 16:11   ` Mike Lothian

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=20260617201140.C15811F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mike@fireburn.co.uk \
    --cc=ojeda@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.