diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 90fb413d9fd7..1ee396ce0eda 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -194,6 +194,12 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) if (qdisc->flags & TCQ_F_NOLOCK) { spin_unlock(&qdisc->seqlock); + /* spin_unlock() only has store-release semantic. The unlock + * and test_bit() ordering is a store-load ordering, so a full + * memory barrier is needed here. + */ + smp_mb(); + if (unlikely(test_bit(__QDISC_STATE_MISSED, &qdisc->state))) { clear_bit(__QDISC_STATE_MISSED, &qdisc->state);