On Tue, Oct 22, 2019 at 05:22:04PM -0700, Tom Rix wrote:
On PREEMPT_RT_FULL while running netperf, a corruptionHas Herbert commented on your initial patch, please
of the skb queue causes an oops.
This appears to be caused by a race condition here
__skb_queue_tail(&trans->queue, skb);
tasklet_schedule(&trans->tasklet);
Where the queue is changed before the tasklet is locked by
tasklet_schedule.
The fix is to use the skb queue lock.
This is the original work of Joerg Vehlow <joerg.vehlow@xxxxxxxxxxx>
https://lkml.org/lkml/2019/9/9/111
xfrm_input: Protect queue with lock
During the skb_queue_splice_init the tasklet could have been preempted
and __skb_queue_tail called, which led to an inconsistent queue.
ifdefs for CONFIG_PREEMPT_RT_FULL added to reduce runtime effects
on the normal kernel.
fix PREEMPT_RT_FULL instead. There are certainly many
more codepaths that take such assumptions. You can not
fix this by distributing a spin_lock_irqsave here
and there.