Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291328 > unrolled thread

[PATCH net-next] net, cgroup: cgroup_sk_updat_lock was missing initializer

Started byTejun Heo <tj@kernel.org>
First post2015-12-14 17:30 +0100
Last post2015-12-14 20:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH net-next] net, cgroup: cgroup_sk_updat_lock was missing  initializer Tejun Heo <tj@kernel.org> - 2015-12-14 17:30 +0100
    Re: [PATCH net-next] net, cgroup: cgroup_sk_updat_lock was missing  initializer David Miller <davem@davemloft.net> - 2015-12-14 20:30 +0100

#1291328 — [PATCH net-next] net, cgroup: cgroup_sk_updat_lock was missing initializer

FromTejun Heo <tj@kernel.org>
Date2015-12-14 17:30 +0100
Subject[PATCH net-next] net, cgroup: cgroup_sk_updat_lock was missing initializer
Message-ID<qFEaD-5c-31@gated-at.bofh.it>
bd1060a1d671 ("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 <tj@kernel.org>
Reported-by: Dexuan Cui <decui@microsoft.com>
Fixes: bd1060a1d671 ("sock, cgroup: add sock->sk_cgroup")
---
Hello, Dexuan.

Oops, sorry about that.  Somehow thought it was a different problem
which is already fixed.  This should do it.

Thanks.

 kernel/cgroup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 4f8f792..4466273f 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1291502

FromDavid Miller <davem@davemloft.net>
Date2015-12-14 20:30 +0100
Message-ID<qFGYO-1Yr-13@gated-at.bofh.it>
In reply to#1291328
From: Tejun Heo <tj@kernel.org>
Date: Mon, 14 Dec 2015 11:24:06 -0500

> bd1060a1d671 ("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 <tj@kernel.org>
> Reported-by: Dexuan Cui <decui@microsoft.com>
> Fixes: bd1060a1d671 ("sock, cgroup: add sock->sk_cgroup")

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web