summaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-05-24 10:37:59 -0600
committerEric W. Biederman <ebiederm@xmission.com>2012-08-14 21:49:25 -0700
commit4f82f45730c68fdaf9b0472495a965188404866e (patch)
tree81b32f29328766a5fc3213c00e4177e0cfbedd40 /include/net/ipv6.h
parent7064d16e162adf8199f0288b694e6af823ed5431 (diff)
downloadop-kernel-dev-4f82f45730c68fdaf9b0472495a965188404866e.zip
op-kernel-dev-4f82f45730c68fdaf9b0472495a965188404866e.tar.gz
net ip6 flowlabel: Make owner a union of struct pid * and kuid_t
Correct a long standing omission and use struct pid in the owner field of struct ip6_flowlabel when the share type is IPV6_FL_S_PROCESS. This guarantees we don't have issues when pid wraparound occurs. Use a kuid_t in the owner field of struct ip6_flowlabel when the share type is IPV6_FL_S_USER to add user namespace support. In /proc/net/ip6_flowlabel capture the current pid namespace when opening the file and release the pid namespace when the file is closed ensuring we print the pid owner value that is meaning to the reader of the file. Similarly use from_kuid_munged to print uid values that are meaningful to the reader of the file. This requires exporting pid_nr_ns so that ipv6 can continue to built as a module. Yoiks what silliness Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 01c34b3..c8a2024 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -222,7 +222,10 @@ struct ip6_flowlabel {
struct ipv6_txoptions *opt;
unsigned long linger;
u8 share;
- u32 owner;
+ union {
+ struct pid *pid;
+ kuid_t uid;
+ } owner;
unsigned long lastuse;
unsigned long expires;
struct net *fl_net;
OpenPOWER on IntegriCloud