diff options
-rw-r--r-- | include/net/cls_cgroup.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index 726cc3536409..dd1fdb8293f5 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h | |||
@@ -45,7 +45,8 @@ static inline u32 task_cls_classid(struct task_struct *p) | |||
45 | return 0; | 45 | return 0; |
46 | 46 | ||
47 | rcu_read_lock(); | 47 | rcu_read_lock(); |
48 | id = rcu_dereference(net_cls_subsys_id); | 48 | id = rcu_dereference_index_check(net_cls_subsys_id, |
49 | rcu_read_lock_held()); | ||
49 | if (id >= 0) | 50 | if (id >= 0) |
50 | classid = container_of(task_subsys_state(p, id), | 51 | classid = container_of(task_subsys_state(p, id), |
51 | struct cgroup_cls_state, css)->classid; | 52 | struct cgroup_cls_state, css)->classid; |