From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/exynos: vidi: use priv->vidi_dev for ctx lookup in vidi_connection_ioctl()
Date: Mon, 23 Feb 2026 06:11:02 +1000 [thread overview]
Message-ID: <review-patch1-20260220033550.124346-2-aha310510@gmail.com> (raw)
In-Reply-To: <20260220033550.124346-2-aha310510@gmail.com>
Patch Review
This patch fixes the bug where `vidi_connection_ioctl()` was calling `dev_get_drvdata(drm_dev->dev)`, which returns the driver data for the exynos-drm master device rather than the vidi component device. The fix adds a `vidi_dev` field to `exynos_drm_private`, sets it during bind, clears it during unbind, and uses it in the ioctl to retrieve the correct `vidi_context`.
> + struct exynos_drm_private *priv = drm_dev->dev_private;
> + struct device *dev = priv ? priv->vidi_dev : NULL;
> + struct vidi_context *ctx = dev ? dev_get_drvdata(dev) : NULL;
> + if (!ctx)
> + return -ENODEV;
The NULL checks on `priv` are defensive -- `dev_private` should always be set if the ioctl is reachable through the DRM device -- but the important case is when `vidi_dev` is NULL because the vidi component hasn't been bound (or has been unbound). Returning `-ENODEV` is the correct behavior in that case.
> + if (priv)
> + priv->vidi_dev = dev;
> + if (priv)
> + priv->vidi_dev = NULL;
Same defensive NULL check on `priv` in bind and unbind. In practice, `drm_dev->dev_private` is set before components bind, but there's no harm in the check. This matches what was merged upstream.
No issues found.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-02-22 20:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 3:35 [PATCH 6.19.y 6.18.y 0/2] drm/exynos: vidi: fix various memory corruption bugs Jeongjun Park
2026-02-20 3:35 ` [PATCH 6.19.y 6.18.y 1/2] drm/exynos: vidi: use priv->vidi_dev for ctx lookup in vidi_connection_ioctl() Jeongjun Park
2026-02-22 20:11 ` Claude Code Review Bot [this message]
2026-02-20 3:35 ` [PATCH 6.19.y 6.18.y 2/2] drm/exynos: vidi: fix to avoid directly dereferencing user pointer Jeongjun Park
2026-02-22 20:11 ` Claude review: " Claude Code Review Bot
2026-02-22 20:11 ` Claude review: drm/exynos: vidi: fix various memory corruption bugs Claude Code Review 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=review-patch1-20260220033550.124346-2-aha310510@gmail.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox