From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
Thomas Zimmermann <tzimmermann@suse.de>,
jfalempe@redhat.com, javierm@redhat.com, rrameshbabu@nvidia.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@gmail.com, simona@ffwll.ch
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 5/7] drm/client: Remove drm_client_framebuffer_delete()
Date: Wed, 22 Oct 2025 10:00:12 +0300 [thread overview]
Message-ID: <202510220056.J4uIVWxn-lkp@intel.com> (raw)
In-Reply-To: <20251020151402.53013-6-tzimmermann@suse.de>
Hi Thomas,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/drm-client-Remove-pitch-from-struct-drm_client_buffer/20251020-231709
base: git://anongit.freedesktop.org/drm/drm drm-next
patch link: https://lore.kernel.org/r/20251020151402.53013-6-tzimmermann%40suse.de
patch subject: [PATCH 5/7] drm/client: Remove drm_client_framebuffer_delete()
config: openrisc-randconfig-r072-20251021 (https://download.01.org/0day-ci/archive/20251022/202510220056.J4uIVWxn-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202510220056.J4uIVWxn-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/drm_client.c:185 drm_client_buffer_delete() warn: variable dereferenced before check 'buffer' (see line 182)
vim +/buffer +185 drivers/gpu/drm/drm_client.c
449148a7300b8b Thomas Zimmermann 2025-10-20 180 void drm_client_buffer_delete(struct drm_client_buffer *buffer)
c76f0f7cb546b6 Noralf Trønnes 2018-07-03 181 {
95d6cf3a3cf1a1 Thomas Zimmermann 2025-10-20 @182 struct drm_gem_object *gem = drm_gem_fb_get_obj(buffer->fb, 0);
^^^^^^^^^^
buffer is dereferenced here
82e2a75e5a640c Thomas Zimmermann 2025-10-20 183 int ret;
82e2a75e5a640c Thomas Zimmermann 2025-10-20 184
449148a7300b8b Thomas Zimmermann 2025-10-20 @185 if (!buffer)
^^^^^^^
checked too late
449148a7300b8b Thomas Zimmermann 2025-10-20 186 return;
449148a7300b8b Thomas Zimmermann 2025-10-20 187
95d6cf3a3cf1a1 Thomas Zimmermann 2025-10-20 188 drm_gem_vunmap(gem, &buffer->map);
95d6cf3a3cf1a1 Thomas Zimmermann 2025-10-20 189
82e2a75e5a640c Thomas Zimmermann 2025-10-20 190 ret = drm_mode_rmfb(buffer->client->dev, buffer->fb->base.id, buffer->client->file);
82e2a75e5a640c Thomas Zimmermann 2025-10-20 191 if (ret)
82e2a75e5a640c Thomas Zimmermann 2025-10-20 192 drm_err(buffer->client->dev,
82e2a75e5a640c Thomas Zimmermann 2025-10-20 193 "Error removing FB:%u (%d)\n", buffer->fb->base.id, ret);
82e2a75e5a640c Thomas Zimmermann 2025-10-20 194
be6ee102341bc4 Emil Velikov 2020-05-15 195 drm_gem_object_put(buffer->gem);
c76f0f7cb546b6 Noralf Trønnes 2018-07-03 196
c76f0f7cb546b6 Noralf Trønnes 2018-07-03 197 kfree(buffer);
c76f0f7cb546b6 Noralf Trønnes 2018-07-03 198 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-10-22 7:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 15:04 [PATCH 0/7] drm/client: Simply client-buffer interface and implementation Thomas Zimmermann
2025-10-20 15:04 ` [PATCH 1/7] drm/client: Remove pitch from struct drm_client_buffer Thomas Zimmermann
2025-10-21 12:44 ` Jocelyn Falempe
2025-10-20 15:04 ` [PATCH 2/7] drm/client: Move dumb-buffer handling to drm_client_framebuffer_create() Thomas Zimmermann
2025-10-21 12:47 ` Jocelyn Falempe
2025-10-20 15:04 ` [PATCH 3/7] drm/client: Inline drm_client_buffer_addfb() and _rmfb() Thomas Zimmermann
2025-10-21 12:49 ` Jocelyn Falempe
2025-10-20 15:04 ` [PATCH 4/7] drm/client: Deprecate struct drm_client_buffer.gem Thomas Zimmermann
2025-10-21 12:49 ` Jocelyn Falempe
2025-10-26 9:12 ` kernel test robot
2025-10-20 15:04 ` [PATCH 5/7] drm/client: Remove drm_client_framebuffer_delete() Thomas Zimmermann
2025-10-21 12:50 ` Jocelyn Falempe
2025-10-22 7:00 ` Dan Carpenter [this message]
2025-10-20 15:04 ` [PATCH 6/7] drm/client: Create client buffers with drm_client_buffer_create_dumb() Thomas Zimmermann
2025-10-21 12:54 ` Jocelyn Falempe
2025-10-20 15:04 ` [PATCH 7/7] drm/client: Flush client buffers with drm_client_buffer_sync() Thomas Zimmermann
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=202510220056.J4uIVWxn-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=lkp@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=rrameshbabu@nvidia.com \
--cc=simona@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox