diff options
| author | Cong Wang <xiyou.wangcong@gmail.com> | 2020-07-09 16:28:44 -0700 |
|---|---|---|
| committer | Bruno Martins <bgcngm@gmail.com> | 2022-10-28 15:39:29 +0100 |
| commit | e3b32750621bda77de1d37bd4af2868970f207b4 (patch) | |
| tree | 268f7f573360d7c66bc97f258b51e09f8feb314a /include/linux/cgroup-defs.h | |
| parent | 69dabcedd4b9417ea8555f413ed02c1bd180cd4c (diff) | |
cgroup: Fix sock_cgroup_data on big-endian.
[ Upstream commit 14b032b8f8fce03a546dcf365454bec8c4a58d7d ]
In order for no_refcnt and is_data to be the lowest order two
bits in the 'val' we have to pad out the bitfield of the u8.
Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I58b286e24b67cf1bcdfb3d6b4aa95289c92966ad
Diffstat (limited to 'include/linux/cgroup-defs.h')
| -rw-r--r-- | include/linux/cgroup-defs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 47a3a69c0396..d3036be98027 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -601,6 +601,7 @@ struct sock_cgroup_data { struct { u8 is_data : 1; u8 no_refcnt : 1; + u8 unused : 6; u8 padding; u16 prioidx; u32 classid; @@ -610,6 +611,7 @@ struct sock_cgroup_data { u32 classid; u16 prioidx; u8 padding; + u8 unused : 6; u8 no_refcnt : 1; u8 is_data : 1; } __packed; |
