Subject: fix for BUG: using smp_processor_id() in preemptible code Fixes using smp_processor_id() in preemptible code as seen when __qdisc_run calls qdisc_restart which calls handle_dev_cpu_collision This is fixed by disabling irqs (and preemption) around cpu_collision++ in handle_dev_cpu_collision Signed-off-by: John Kacur Index: linux-2.6.26.1-rt1.jk/net/sched/sch_generic.c =================================================================== --- linux-2.6.26.1-rt1.jk.orig/net/sched/sch_generic.c +++ linux-2.6.26.1-rt1.jk/net/sched/sch_generic.c @@ -94,6 +94,7 @@ static inline int handle_dev_cpu_collisi struct Qdisc *q) { int ret; + unsigned long flags; if (unlikely(dev->xmit_lock_owner == (void *)current)) { /* @@ -112,7 +113,9 @@ static inline int handle_dev_cpu_collisi * Another cpu is holding lock, requeue & delay xmits for * some time. */ + local_irq_save(flags); __get_cpu_var(netdev_rx_stat).cpu_collision++; + local_irq_restore(flags); ret = dev_requeue_skb(skb, dev, q); }