* [PATCH] Fix for "cgroup: Assign subsystem IDs during compile time"
@ 2012-09-14 14:33 Daniel Wagner
2012-09-14 14:33 ` [PATCH v6] cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h Daniel Wagner
2012-09-14 14:33 ` [PATCH] cgroup: net_cls: Include missing header with sock_update_classid() definition Daniel Wagner
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Wagner @ 2012-09-14 14:33 UTC (permalink / raw)
To: linux-kernel, linux-next
Cc: Daniel Wagner, David S. Miller, Michael S. Tsirkin, Gao feng,
Jamal Hadi Salim, Joe Perches, John Fastabend, Li Zefan,
Neil Horman, Rick Jones, Stanislav Kinsbursky, Tejun Heo, netdev,
cgroups
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
Hi,
Sorry for breaking Tejun's cgroup for-3.7 branch. Here are two patches
which fix this problem. Either of them will do.
cheers,
daniel
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Joe Perches <joe@perches.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Rick Jones <rick.jones2@hp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
--
1.7.12.315.g682ce8b
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v6] cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h
2012-09-14 14:33 [PATCH] Fix for "cgroup: Assign subsystem IDs during compile time" Daniel Wagner
@ 2012-09-14 14:33 ` Daniel Wagner
2012-09-14 14:33 ` [PATCH] cgroup: net_cls: Include missing header with sock_update_classid() definition Daniel Wagner
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Wagner @ 2012-09-14 14:33 UTC (permalink / raw)
To: linux-kernel, linux-next
Cc: Daniel Wagner, Gao feng, Jamal Hadi Salim, John Fastabend,
Neil Horman, Stephen Rothwell, netdev, cgroups
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
The two users of sock_update_classid() are net/socket.c and
drivers/net/tun.c. socket.c includes cls_cgroup.h already. Update
tun.c to inlcude the header.
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
---
This patch is an updated version of the faulty one.
drivers/net/tun.c | 1 +
include/net/cls_cgroup.h | 6 ++++++
include/net/sock.h | 8 --------
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3a16d4f..9336b82 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -68,6 +68,7 @@
#include <net/netns/generic.h>
#include <net/rtnetlink.h>
#include <net/sock.h>
+#include <net/cls_cgroup.h>
#include <asm/uaccess.h>
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h
index a4dc5b0..e88527a 100644
--- a/include/net/cls_cgroup.h
+++ b/include/net/cls_cgroup.h
@@ -24,6 +24,8 @@ struct cgroup_cls_state
u32 classid;
};
+extern void sock_update_classid(struct sock *sk);
+
#ifdef CONFIG_NET_CLS_CGROUP
static inline u32 task_cls_classid(struct task_struct *p)
{
@@ -62,6 +64,10 @@ static inline u32 task_cls_classid(struct task_struct *p)
}
#endif
#else
+static inline void sock_update_classid(struct sock *sk)
+{
+}
+
static inline u32 task_cls_classid(struct task_struct *p)
{
return 0;
diff --git a/include/net/sock.h b/include/net/sock.h
index 72132ae..160a680 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1486,14 +1486,6 @@ extern void *sock_kmalloc(struct sock *sk, int size,
extern void sock_kfree_s(struct sock *sk, void *mem, int size);
extern void sk_send_sigurg(struct sock *sk);
-#ifdef CONFIG_CGROUPS
-extern void sock_update_classid(struct sock *sk);
-#else
-static inline void sock_update_classid(struct sock *sk)
-{
-}
-#endif
-
/*
* Functions to fill in entries in struct proto_ops when a protocol
* does not implement a particular function.
--
1.7.12.315.g682ce8b
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] cgroup: net_cls: Include missing header with sock_update_classid() definition
2012-09-14 14:33 [PATCH] Fix for "cgroup: Assign subsystem IDs during compile time" Daniel Wagner
2012-09-14 14:33 ` [PATCH v6] cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h Daniel Wagner
@ 2012-09-14 14:33 ` Daniel Wagner
[not found] ` <1347633184-26837-3-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Wagner @ 2012-09-14 14:33 UTC (permalink / raw)
To: linux-kernel, linux-next
Cc: Daniel Wagner, David S. Miller, Michael S. Tsirkin, Gao feng,
Jamal Hadi Salim, Joe Perches, John Fastabend, Li Zefan,
Neil Horman, Rick Jones, Stanislav Kinsbursky, Tejun Heo, netdev,
cgroups
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
commit 1f66c0a8833c3974ab6b35edcf4f8585b2f94592
Author: Daniel Wagner <daniel.wagner@bmw-carit.de>
Date: Wed Sep 12 16:12:01 2012 +0200
cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h
Claimed that there was only net/socket.c depending on
sock_update_class(). That is not true drivers/net/tun.c needs to
include the cls_cgroup.h header too.
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Joe Perches <joe@perches.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Rick Jones <rick.jones2@hp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
---
This version is on top of the latest cgroup for-3.7 branch.
drivers/net/tun.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3a16d4f..9336b82 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -68,6 +68,7 @@
#include <net/netns/generic.h>
#include <net/rtnetlink.h>
#include <net/sock.h>
+#include <net/cls_cgroup.h>
#include <asm/uaccess.h>
--
1.7.12.315.g682ce8b
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-14 14:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 14:33 [PATCH] Fix for "cgroup: Assign subsystem IDs during compile time" Daniel Wagner
2012-09-14 14:33 ` [PATCH v6] cgroup: net_cls: Move sock_update_classid() declaration to cls_cgroup.h Daniel Wagner
2012-09-14 14:33 ` [PATCH] cgroup: net_cls: Include missing header with sock_update_classid() definition Daniel Wagner
[not found] ` <1347633184-26837-3-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-09-14 14:43 ` Sedat Dilek
[not found] ` <CA+icZUUrdGgUM32r88EyRHEb3Q6bULqnk74PikQ8A9q25ZA3NA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-14 14:50 ` Daniel Wagner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).