In the Linux kernel, the following vulnerability has been resolved:
rcutorture: Fix rcutortureoneextend_check() splat in RT kernels
For built with CONFIGPREEMPTRT=y kernels, running rcutorture tests resulted in the following splat:
[ 68.797425] rcutortureoneextendcheck during change: Current 0x1 To add 0x1 To remove 0x0 preemptcount() 0x0 [ 68.797533] WARNING: CPU: 2 PID: 512 at kernel/rcu/rcutorture.c:1993 rcutortureoneextendcheck+0x419/0x560 [rcutorture] [ 68.797601] Call Trace: [ 68.797602] <TASK> [ 68.797619] ? lockdepsoftirqsoff+0xa5/0x160 [ 68.797631] rcutortureoneextend+0x18e/0xcc0 [rcutorture 2466dbd2ff34dbaa36049cb323a80c3306ac997c] [ 68.797646] ? localclock+0x19/0x40 [ 68.797659] rcutortureoneread+0xf0/0x280 [rcutorture 2466dbd2ff34dbaa36049cb323a80c3306ac997c] [ 68.797678] ? _pfxrcutortureoneread+0x10/0x10 [rcutorture 2466dbd2ff34dbaa36049cb323a80c3306ac997c] [ 68.797804] ? _pfxrcutorturetimer+0x10/0x10 [rcutorture 2466dbd2ff34dbaa36049cb323a80c3306ac997c] [ 68.797815] rcu-torture: rcutorturereader task started [ 68.797824] rcu-torture: Creating rcutorturereader task [ 68.797824] rcutorturereader+0x238/0x580 [rcutorture 2466dbd2ff34dbaa36049cb323a80c3306ac997c] [ 68.797836] ? kvmschedclock_read+0x15/0x30
Disable BH does not change the SOFTIRQ corresponding bits in preemptcount() for RT kernels, this commit therefore use softirqcount() to check the if BH is disabled.