Skip to contentSkip to conversation

System crash in tcp_fragment()

DISCUSSION [email protected] 2 participants 2 messages May 21, 2002 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello!

Quoted 9 lines

Such rule does not even make this piece of code legal. Consider:

task1:cpu0: x = counters[smp_processor_id()];
cpu0: PREEMPT
task2:cpu0: x = counters[smp_processor_id()];
task2:cpu0: counters[smp_processor_id()] = x + 1;
cpu0: PREEMPT
task1:cpu0: counters[smp_processor_id()] = x + 1;
full garbage

Yup. And this has nothing to do with SMP...

Quoted 2 lines

But it does bring up important point, preemption people need to fully audit entire networking.

Well, we can make this. It is too serious. Anyway, this means that preemptive patch for 2.4 is "tainting" :-)

Alexey

#2 lore raw
In reply to a message not in the archive
Quoted 10 lines · David S. Miller

Such rule does not even make this piece of code legal. Consider:

task1:cpu0: x = counters[smp_processor_id()];
cpu0: PREEMPT
task2:cpu0: x = counters[smp_processor_id()];
task2:cpu0: counters[smp_processor_id()] = x + 1;
cpu0: PREEMPT
task1:cpu0: counters[smp_processor_id()] = x + 1;
full garbage

Quoted 8 lines

But it does bring up important point, preemption people need to fully audit entire networking.

It is totally broken by preemption the more I think about it.

At the very beginning, all the SNMP counter bumping tricks will totally fail with preemption enabled.

A lot of the synchronization between process context and interrupt context is based on per-cpu data structures or simple locks (without disabling irq's globally) eg:

softnet_data queue (we only disable local interrupts), and synchronization between tcp_readmsg() and tcp_rcv() over the receive queue would get confused (lock.users flag would be different on another CPU)..

Wonder how any of it could possibly work..

thanks,
Nivedita