On Fri, Nov 06, 2026 at 02:56:59PM +0000, Tvrtko Ursulin wrote: > @@ -139,7 +141,10 @@ int drm_sched_entity_init(struct drm_sched_entity > *entity, > entity->guilty = guilty; > entity->last_user = current->group_leader; > entity->num_sched_list = num_sched_list; > - entity->sched_list = num_sched_list > 1 ? sched_list : NULL; > + if (num_sched_list == 1) > + entity->sched = sched_list[0]; > + else > + entity->sched_list = sched_list;
This breaks rocket. rocket_job_open() passes a kmalloc'ed array of rdev->num_cores schedulers, and rocket_job_close() does kfree(entity->sched_list). With only one core bound when the file is opened (e.g. the other cores probe later), the union now holds &rdev->cores[0].sched, so close kfree()s a pointer into the devm allocation. Before this patch it was kfree(NULL) (and the array leaked). I can send a rocket fix that keeps its own pointer to the array and frees that instead, so it can go in before this patch, unless you'd rather carry it in this series. Thanks, Sidong
