pick_next_rt_entity() may return a type confused entry, not detected by the BUG_ON condition, as the confused entry will not be NULL, but list_head. The buggy error condition would lead to a type confused entry with the list head, which would then be used as a type confused sched_rt_entity, causing memory corruption. It is hard to trigger it, because found it with static analysis and were not able to trigger it manually. But pick_next_rt_entity() may return a type confused entry, the BUG_ON will never trigger since it assumes the error condition is NULL, while the buggy error condition would be a type confused entry with the list head, which would then be used as a type confused sched_rt_entity. Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7c4a5b89a0b5a57a64b601775b296abf77a9fe97
Created kernel tracking bugs for this issue: Affects: fedora-all [bug 2212185]
This was fixed for Fedora in the 6.1.16 stable kernel update.