Skip to content

Commit

Permalink
net, cgroup: cgroup_sk_updat_lock was missing initializer
Browse files Browse the repository at this point in the history
bd1060a ("sock, cgroup: add sock->sk_cgroup") added global
spinlock cgroup_sk_update_lock but erroneously skipped initializer
leading to uninitialized spinlock warning.  Fix it by using
DEFINE_SPINLOCK().

Signed-off-by: Tejun Heo <[email protected]>
Reported-by: Dexuan Cui <[email protected]>
Fixes: bd1060a ("sock, cgroup: add sock->sk_cgroup")
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
htejun authored and davem330 committed Dec 14, 2015
1 parent cb4396e commit 3fa4cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/cgroup.c
Original file line number Diff line number Diff line change
@@ -5790,7 +5790,7 @@ EXPORT_SYMBOL_GPL(cgroup_get_from_path);

#if defined(CONFIG_CGROUP_NET_PRIO) || defined(CONFIG_CGROUP_NET_CLASSID)

spinlock_t cgroup_sk_update_lock;
DEFINE_SPINLOCK(cgroup_sk_update_lock);
static bool cgroup_sk_alloc_disabled __read_mostly;

void cgroup_sk_alloc_disable(void)

0 comments on commit 3fa4cc9

Please sign in to comment.