ANDROID: fix ABI-break in struct cgroup_root
Fix the ABI issues introduced by commit dd9542ae7c
("cgroup: Make
operations on the cgroup root_list RCU safe"). Use _some_ of the bits
reserved in cgroup_root for the new root->rcu member. This new offset
restricts the usage of kfree_rcu() though, so this call has replaced
with call_rcu() instead. Update the stg file with this update:
type 'struct cgroup_root' changed
member 'u8 android_backport_reserved1[28]' was removed
member 'union { struct callback_head rcu; struct { u8 android_backport_reserved1[28]; }; union { }; }' was added
Bug: 379227997
Suggested-by: T.J. Mercier <tjmercier@google.com>
Change-Id: I3e76ca05ee6d68f7167bf487348f438cd2a00d5f
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
a3937e3e63
commit
d66e9166bf
@@ -42307,6 +42307,10 @@ member {
|
||||
id: 0x2ef635de
|
||||
type_id: 0x34f6a768
|
||||
}
|
||||
member {
|
||||
id: 0x2efe0273
|
||||
type_id: 0x34d679de
|
||||
}
|
||||
member {
|
||||
id: 0x2f1819a7
|
||||
type_id: 0x334e168e
|
||||
@@ -43924,6 +43928,11 @@ member {
|
||||
type_id: 0x73b9d605
|
||||
offset: 256
|
||||
}
|
||||
member {
|
||||
id: 0x3f2a640d
|
||||
type_id: 0x7387dd81
|
||||
offset: 49472
|
||||
}
|
||||
member {
|
||||
id: 0x3f2df7ff
|
||||
type_id: 0x7399b0f3
|
||||
@@ -49772,10 +49781,9 @@ member {
|
||||
type_id: 0x92233392
|
||||
}
|
||||
member {
|
||||
id: 0xb2e8fb7e
|
||||
id: 0xb2e8f417
|
||||
name: "android_backport_reserved1"
|
||||
type_id: 0x1159eb36
|
||||
offset: 49472
|
||||
}
|
||||
member {
|
||||
id: 0x71aeb2cd
|
||||
@@ -222059,6 +222067,14 @@ struct_union {
|
||||
member_id: 0x39ff19b6
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
id: 0x34d679de
|
||||
kind: STRUCT
|
||||
definition {
|
||||
bytesize: 32
|
||||
member_id: 0xb2e8f417
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
id: 0x34ed11d4
|
||||
kind: STRUCT
|
||||
@@ -226230,6 +226246,16 @@ struct_union {
|
||||
member_id: 0x92478c56
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
id: 0x7387dd81
|
||||
kind: UNION
|
||||
definition {
|
||||
bytesize: 32
|
||||
member_id: 0x95dac977
|
||||
member_id: 0x2efe0273
|
||||
member_id: 0x36752b74
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
id: 0x7399b0f3
|
||||
kind: UNION
|
||||
@@ -231813,7 +231839,7 @@ struct_union {
|
||||
member_id: 0x2d2d08b0
|
||||
member_id: 0xe8e1b772
|
||||
member_id: 0x0de6d95b
|
||||
member_id: 0xb2e8fb7e
|
||||
member_id: 0x3f2a640d
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
|
@@ -82,3 +82,7 @@ type 'enum ftrace_dump_mode' changed
|
||||
|
||||
1 variable symbol(s) removed
|
||||
'struct tracepoint __tracepoint_android_vh_suitable_migration_target_bypass'
|
||||
|
||||
type 'struct cgroup_root' changed
|
||||
member 'u8 android_backport_reserved1[28]' was removed
|
||||
member 'union { struct callback_head rcu; struct { u8 android_backport_reserved1[28]; }; union { }; }' was added
|
||||
|
@@ -575,7 +575,6 @@ struct cgroup_root {
|
||||
|
||||
/* A list running through the active hierarchies */
|
||||
struct list_head root_list;
|
||||
struct rcu_head rcu;
|
||||
|
||||
/* Hierarchy-specific flags */
|
||||
unsigned int flags;
|
||||
@@ -586,7 +585,8 @@ struct cgroup_root {
|
||||
/* The name for this hierarchy - may be empty */
|
||||
char name[MAX_CGROUP_ROOT_NAMELEN];
|
||||
|
||||
ANDROID_BACKPORT_RESERVE_ARRAY(1, CGROUP_SUBSYS_COUNT * sizeof(atomic_t));
|
||||
ANDROID_BACKPORT_USE_ARRAY(1, CGROUP_SUBSYS_COUNT * sizeof(atomic_t),
|
||||
struct rcu_head rcu);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -1315,9 +1315,14 @@ static void cgroup_exit_root_id(struct cgroup_root *root)
|
||||
idr_remove(&cgroup_hierarchy_idr, root->hierarchy_id);
|
||||
}
|
||||
|
||||
static void __cgroup_free_root(struct rcu_head *rcu)
|
||||
{
|
||||
kfree(container_of(rcu, struct cgroup_root, rcu));
|
||||
}
|
||||
|
||||
void cgroup_free_root(struct cgroup_root *root)
|
||||
{
|
||||
kfree_rcu(root, rcu);
|
||||
call_rcu(&root->rcu, __cgroup_free_root);
|
||||
}
|
||||
|
||||
static void cgroup_destroy_root(struct cgroup_root *root)
|
||||
|
Reference in New Issue
Block a user