cls_cgroup: read classid atomically in classifier
[safe/jmp/linux-2.6] / net / sched / sch_atm.c
index ca90f6e..2a8b83a 100644 (file)
@@ -102,7 +102,8 @@ static int atm_tc_graft(struct Qdisc *sch, unsigned long arg,
                return -EINVAL;
        if (!new)
                new = &noop_qdisc;
-       *old = xchg(&flow->q, new);
+       *old = flow->q;
+       flow->q = new;
        if (*old)
                qdisc_reset(*old);
        return 0;