From: kernel test robot <lkp@intel.com>
To: Leo Li <sunpeng.li@amd.com>
Cc: oe-kbuild-all@lists.linux.dev,
"Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: [superm1:superm1/backlight-property-v5 3/21] drivers/gpu/drm/drm_vblank.c:1412:6-25: WARNING: atomic_dec_and_test variation before object free at line 1419.
Date: Mon, 01 Jun 2026 23:14:57 +0800 [thread overview]
Message-ID: <202606012258.f60EpMuU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git superm1/backlight-property-v5
head: 5f2330560c00d587cd173ee4222011b62e1ac567
commit: eaf99ccba37426aac11866ffb268bd6b68417b00 [3/21] drm/vblank: Introduce deferred vblank enable/disable
config: sh-randconfig-r052-20260601 (https://download.01.org/0day-ci/archive/20260601/202606012258.f60EpMuU-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 10.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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606012258.f60EpMuU-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_vblank.c:1412:6-25: WARNING: atomic_dec_and_test variation before object free at line 1419.
drivers/gpu/drm/drm_vblank.c:1412:6-25: WARNING: atomic_dec_and_test variation before object free at line 1426.
vim +1412 drivers/gpu/drm/drm_vblank.c
1395
1396 void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
1397 {
1398 struct drm_vblank_crtc *vblank = drm_vblank_crtc(dev, pipe);
1399 int vblank_offdelay = vblank->config.offdelay_ms;
1400 bool needs_deferred_disable;
1401
1402 if (drm_WARN_ON(dev, pipe >= dev->num_crtcs))
1403 return;
1404
1405 if (drm_WARN_ON(dev, atomic_read(&vblank->refcount) == 0))
1406 return;
1407
1408 needs_deferred_disable =
1409 drm_crtc_needs_deferred_vblank(drm_crtc_from_index(dev, pipe));
1410
1411 /* Last user schedules interrupt disable */
> 1412 if (!atomic_dec_and_test(&vblank->refcount))
1413 return;
1414
1415 if (!vblank_offdelay)
1416 return;
1417 else if (vblank_offdelay < 0) {
1418 if (needs_deferred_disable)
> 1419 mod_delayed_work(dev->deferred_vblank_wq,
1420 &vblank->disable_work,
1421 0);
1422 else
1423 vblank_disable_fn(&vblank->disable_timer);
1424 } else if (!vblank->config.disable_immediate) {
1425 if (needs_deferred_disable)
1426 mod_delayed_work(dev->deferred_vblank_wq,
1427 &vblank->disable_work,
1428 msecs_to_jiffies(vblank_offdelay));
1429 else
1430 mod_timer(&vblank->disable_timer,
1431 jiffies + ((vblank_offdelay * HZ) / 1000));
1432 }
1433 }
1434
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-06-01 15:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202606012258.f60EpMuU-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sunpeng.li@amd.com \
--cc=superm1@kernel.org \
/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.