* [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.
@ 2026-06-01 15:14 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-01 15:14 UTC (permalink / raw)
To: Leo Li; +Cc: oe-kbuild-all, Mario Limonciello (AMD)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-01 15:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 15:14 [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 kernel test robot
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.