Skip to content

Commit

Permalink
net: Use RCU_POINTER_INITIALIZER() to init static variable
Browse files Browse the repository at this point in the history
This pointer is RCU protected, so proper primitives should be used.

Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li RongQing authored and David S. Miller committed Feb 26, 2019
1 parent 7b2464d commit 3b40bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ struct Qdisc_ops noop_qdisc_ops __read_mostly = {
};

static struct netdev_queue noop_netdev_queue = {
.qdisc = &noop_qdisc,
RCU_POINTER_INITIALIZER(qdisc, &noop_qdisc),
.qdisc_sleeping = &noop_qdisc,
};

Expand Down

0 comments on commit 3b40bf4

Please sign in to comment.