From: Cong Wang Date: Thu, 9 Jul 2020 23:28:44 +0000 (-0700) Subject: cgroup: Fix sock_cgroup_data on big-endian. X-Git-Tag: v4.9.231~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65888672c390f53d7c3b86c0a3c93c06b290a5f7;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 8428a4cb2c05..b3e7da0bf50f 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -589,6 +589,7 @@ struct sock_cgroup_data { struct { u8 is_data : 1; u8 no_refcnt : 1; + u8 unused : 6; u8 padding; u16 prioidx; u32 classid; @@ -598,6 +599,7 @@ struct sock_cgroup_data { u32 classid; u16 prioidx; u8 padding; + u8 unused : 6; u8 no_refcnt : 1; u8 is_data : 1; } __packed;