From: sashiko-bot@kernel.org
To: "Srinivasan Shanmugam" <srinivasan.shanmugam@amd.com>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v9 2/3] drm: Add drm_user_fence helper
Date: Wed, 09 Sep 2026 04:54:47 +0000 [thread overview]
Message-ID: <20260909045448.4B27C1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260909044454.399340-3-srinivasan.shanmugam@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Build failure on NOMMU architectures due to unconditional use of mmput_async()
--
commit dc8e122093c744c8bd5d72581571fdb0ccb6856c
Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
drm: Add drm_user_fence helper
Introduce a common DRM user fence helper providing the kref-managed,
MM-borrowing dma-fence-callback-to-workqueue pattern used by drivers
that must access userspace memory from a kthread context when a GPU
fence signals.
> diff --git a/drivers/gpu/drm/drm_user_fence.c b/drivers/gpu/drm/drm_user_fence.c
> new file mode 100644
> index 0000000000000..f7882208a8b73
> --- /dev/null
> +++ b/drivers/gpu/drm/drm_user_fence.c
[ ... ]
> +static void drm_user_fence_do_work(struct drm_work_fence *wfence)
> +{
> + struct drm_user_fence *ufence =
> + container_of(wfence, struct drm_user_fence, base);
> + struct mm_struct *mm = NULL;
> +
> + if (mmget_not_zero(ufence->mm)) {
> + mm = ufence->mm;
> + kthread_use_mm(mm);
> + }
> +
> + ufence->ops->writeback(ufence, !!mm);
> +
> + if (mm) {
> + kthread_unuse_mm(mm);
> + mmput_async(mm); /* requires CONFIG_MMU — GPU requires MMU */
[Severity: Low]
Does this cause a build failure on architectures where CONFIG_MMU is disabled?
Although the comment notes that GPUs require an MMU, the DRM core and this
file are compiled unconditionally as part of CONFIG_DRM. Calling mmput_async()
here without an #ifdef CONFIG_MMU guard or similar protection could result in
an implicit function declaration or linker error on NOMMU builds.
> + }
> +}
> +
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909044454.399340-1-srinivasan.shanmugam@amd.com?part=2
next prev parent reply other threads:[~2026-09-09 4:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 4:44 [PATCH v9 0/3] drm: Extract dma-fence-to-workqueue pattern into common helpers Srinivasan Shanmugam
2026-09-09 4:44 ` [PATCH v9 1/3] drm: Add drm_work_fence helper Srinivasan Shanmugam
2026-09-09 4:56 ` sashiko-bot
2026-09-09 4:44 ` [PATCH v9 2/3] drm: Add drm_user_fence helper Srinivasan Shanmugam
2026-09-09 4:54 ` sashiko-bot [this message]
2026-09-09 4:44 ` [PATCH v9 3/3] drm/xe: Convert xe_user_fence to drm_user_fence Srinivasan Shanmugam
2026-09-09 4:57 ` sashiko-bot
2026-09-09 4:51 ` ✗ CI.checkpatch: warning for drm: Extract dma-fence-to-workqueue pattern into common helpers (rev2) Patchwork
2026-09-09 4:53 ` ✓ CI.KUnit: success " Patchwork
2026-09-09 5:45 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-09 10:49 ` ✓ Xe.CI.FULL: " Patchwork
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=20260909045448.4B27C1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=srinivasan.shanmugam@amd.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