Re: [RFC PATCH] drm/sched/tests: Let the DRM scheduler manage job lifetimes
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <[email protected]> |
BCC: [email protected] CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Marco Pagani <[email protected]> Hi Marco, [This is a private test report for your RFC patch.] kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on linus/master v7.2-rc6 next-20260807] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Marco-Pagani/drm-sched-tests-Let-the-DRM-scheduler-manage-job-lifetimes/20260807-105436 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260707114807.154572-1-marco.pagani%40linux.dev patch subject: [RFC PATCH] drm/sched/tests: Let the DRM scheduler manage job lifetimes :::::: branch date: 3 days ago :::::: commit date: 3 days ago config: mips-randconfig-r062-20260810 (https://download.01.org/0day-ci/archive/20260810/[email protected]/config) compiler: mips-linux-gcc (GCC) 11.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 <[email protected]> | Reported-by: Julia Lawall <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ cocci warnings: (new ones prefixed by >>) >> drivers/gpu/drm/scheduler/tests/mock_scheduler.c:139:18-21: ERROR: reference preceded by free on line 135 vim +139 drivers/gpu/drm/scheduler/tests/mock_scheduler.c 2e842124be0d553 Marco Pagani 2026-07-07 106 5a99350794fec11 Tvrtko Ursulin 2025-03-24 107 /** 5a99350794fec11 Tvrtko Ursulin 2025-03-24 108 * drm_mock_sched_job_new - Create a new mock scheduler job 5a99350794fec11 Tvrtko Ursulin 2025-03-24 109 * 5a99350794fec11 Tvrtko Ursulin 2025-03-24 110 * @test: KUnit test owning the job 5a99350794fec11 Tvrtko Ursulin 2025-03-24 111 * @entity: Scheduler entity of the job 5a99350794fec11 Tvrtko Ursulin 2025-03-24 112 * 5a99350794fec11 Tvrtko Ursulin 2025-03-24 113 * Returns: New mock scheduler job with allocation managed by the test 5a99350794fec11 Tvrtko Ursulin 2025-03-24 114 */ 5a99350794fec11 Tvrtko Ursulin 2025-03-24 115 struct drm_mock_sched_job * 5a99350794fec11 Tvrtko Ursulin 2025-03-24 116 drm_mock_sched_job_new(struct kunit *test, 5a99350794fec11 Tvrtko Ursulin 2025-03-24 117 struct drm_mock_sched_entity *entity) 5a99350794fec11 Tvrtko Ursulin 2025-03-24 118 { 5a99350794fec11 Tvrtko Ursulin 2025-03-24 119 struct drm_mock_sched_job *job; 5a99350794fec11 Tvrtko Ursulin 2025-03-24 120 int ret; 5a99350794fec11 Tvrtko Ursulin 2025-03-24 121 2e842124be0d553 Marco Pagani 2026-07-07 122 /* Let the DRM Scheduler manage the lifetime of the job */ 2e842124be0d553 Marco Pagani 2026-07-07 123 job = kzalloc_obj(*job, GFP_KERNEL); 5a99350794fec11 Tvrtko Ursulin 2025-03-24 124 KUNIT_ASSERT_NOT_NULL(test, job); 5a99350794fec11 Tvrtko Ursulin 2025-03-24 125 2e842124be0d553 Marco Pagani 2026-07-07 126 kref_init(&job->refcount); 2e842124be0d553 Marco Pagani 2026-07-07 127 job->test = test; 2e842124be0d553 Marco Pagani 2026-07-07 128 5a99350794fec11 Tvrtko Ursulin 2025-03-24 129 ret = drm_sched_job_init(&job->base, 5a99350794fec11 Tvrtko Ursulin 2025-03-24 130 &entity->base, 5a99350794fec11 Tvrtko Ursulin 2025-03-24 131 1, 2956554823cedb3 Pierre-Eric Pelloux-Prayer 2025-05-26 132 NULL, 2956554823cedb3 Pierre-Eric Pelloux-Prayer 2025-05-26 133 1); 2e842124be0d553 Marco Pagani 2026-07-07 134 if (ret) { 2e842124be0d553 Marco Pagani 2026-07-07 @135 kfree(job); 2e842124be0d553 Marco Pagani 2026-07-07 136 KUNIT_ASSERT_EQ_MSG(test, ret, 0, "drm_sched_job_init failed"); 2e842124be0d553 Marco Pagani 2026-07-07 137 } 5a99350794fec11 Tvrtko Ursulin 2025-03-24 138 5a99350794fec11 Tvrtko Ursulin 2025-03-24 @139 init_completion(&job->done); 5a99350794fec11 Tvrtko Ursulin 2025-03-24 140 INIT_LIST_HEAD(&job->link); 1afba39f9305fe4 Thomas Zimmermann 2025-04-07 141 hrtimer_setup(&job->timer, drm_mock_sched_job_signal_timer, 1afba39f9305fe4 Thomas Zimmermann 2025-04-07 142 CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 5a99350794fec11 Tvrtko Ursulin 2025-03-24 143 2e842124be0d553 Marco Pagani 2026-07-07 144 ret = kunit_add_action(test, drm_mock_sched_job_cleanup_action, job); 2e842124be0d553 Marco Pagani 2026-07-07 145 if (ret) { 2e842124be0d553 Marco Pagani 2026-07-07 146 drm_mock_sched_job_put(job); 2e842124be0d553 Marco Pagani 2026-07-07 147 KUNIT_ASSERT_EQ_MSG(test, ret, 0, "kunit_add_action failed"); 2e842124be0d553 Marco Pagani 2026-07-07 148 } 2e842124be0d553 Marco Pagani 2026-07-07 149 5a99350794fec11 Tvrtko Ursulin 2025-03-24 150 return job; 5a99350794fec11 Tvrtko Ursulin 2025-03-24 151 } 5a99350794fec11 Tvrtko Ursulin 2025-03-24 152 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki