diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-07 09:43:38 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-07 09:43:45 +0200 |
commit | 556ef63255f1a6f82910a637c4164dbf7d3d1af2 (patch) | |
tree | ae209fe4959e0837bf4eb72abc6e02c8a82179a1 /include/net/cls_cgroup.h | |
parent | Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/pa... (diff) | |
parent | Linux 2.6.36-rc7 (diff) | |
download | linux-556ef63255f1a6f82910a637c4164dbf7d3d1af2.tar.xz linux-556ef63255f1a6f82910a637c4164dbf7d3d1af2.zip |
Merge commit 'v2.6.36-rc7' into core/rcu
Merge reason: Update from -rc3 to -rc7.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/net/cls_cgroup.h')
-rw-r--r-- | include/net/cls_cgroup.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index dd1fdb8293f5..a4dc5b027bd9 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h @@ -27,11 +27,17 @@ struct cgroup_cls_state #ifdef CONFIG_NET_CLS_CGROUP static inline u32 task_cls_classid(struct task_struct *p) { + int classid; + if (in_interrupt()) return 0; - return container_of(task_subsys_state(p, net_cls_subsys_id), - struct cgroup_cls_state, css)->classid; + rcu_read_lock(); + classid = container_of(task_subsys_state(p, net_cls_subsys_id), + struct cgroup_cls_state, css)->classid; + rcu_read_unlock(); + + return classid; } #else extern int net_cls_subsys_id; |