All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 5/6] drm/msm: fbdev: Use a DRM client buffer
Date: Thu, 18 Jun 2026 14:26:56 +0000	[thread overview]
Message-ID: <20260618142656.7CBAC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260618141249.151338-6-tzimmermann@suse.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unbalanced `vmap_count` decrement and kernel warning on probe error path.
--

commit a68322c2e5e8736f3b039ddfe130065a05ddf719
Author: Thomas Zimmermann <tzimmermann@suse.de>
drm/msm: fbdev: Use a DRM client buffer

This commit replaces the internal DRM framebuffer with a DRM client buffer
in msm_fbdev. It unifies framebuffer allocation for DRM clients in user
space and the internal fbdev emulation, and simplifies the clean-up side.

> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> index 5532c5779f17c..f14db46aa51e2 100644
> --- a/drivers/gpu/drm/msm/msm_fbdev.c
> +++ b/drivers/gpu/drm/msm/msm_fbdev.c

[ ... ]

> @@ -162,19 +161,29 @@ int msm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
>  	fbi->screen_buffer = msm_gem_get_vaddr(bo);
>  	if (IS_ERR(fbi->screen_buffer)) {
>  		ret = PTR_ERR(fbi->screen_buffer);
> -		goto err_drm_framebuffer_remove;
> +		goto err_msm_gem_put_vaddr;

[Severity: Medium]
If msm_gem_get_vaddr() fails and returns an error pointer, the vmap_count
is not incremented. Does jumping to err_msm_gem_put_vaddr here cause an
unbalanced msm_gem_put_vaddr() call that will underflow vmap_count and
trigger a GEM_WARN_ON() kernel warning?

It seems this should instead skip the put_vaddr step and jump straight to
err_drm_client_buffer_delete.

>  	}
>  	fbi->screen_size = bo->size;
>  	fbi->fix.smem_start = paddr;
>  	fbi->fix.smem_len = bo->size;

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260618141249.151338-1-tzimmermann@suse.de?part=5

  reply	other threads:[~2026-06-18 14:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 14:11 [PATCH v2 0/6] drm/msm: fbdev: Use client buffers Thomas Zimmermann
2026-06-18 14:11 ` [PATCH v2 1/6] drm/msm: Do not declare msm_framebuffer_init() as static Thomas Zimmermann
2026-06-18 14:11 ` [PATCH v2 2/6] drm/msm: fbdev: Inline msm_alloc_stolen_fb() Thomas Zimmermann
2026-06-18 14:11 ` [PATCH v2 3/6] drm/msm: fbdev: Fix error reporting Thomas Zimmermann
2026-06-18 14:11 ` [PATCH v2 4/6] drm/msm: fbdev: Calculate buffer geometry with format helpers Thomas Zimmermann
2026-06-18 14:11 ` [PATCH v2 5/6] drm/msm: fbdev: Use a DRM client buffer Thomas Zimmermann
2026-06-18 14:26   ` sashiko-bot [this message]
2026-06-18 14:11 ` [PATCH v2 6/6] drm/msm: Make msm_framebuffer_init() an internal interface again Thomas Zimmermann
2026-06-18 14:20   ` 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=20260618142656.7CBAC1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tzimmermann@suse.de \
    /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.