ANDROID: Different fix for KABI breakage in 4.19.209 in struct sock

This partially reverts commit ddf077f140.

Then fixes things up in such a way that
  BUILD_CONFIG=build/build.config.net_test for kernel_test
still works.

Bug: 202712021
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I40e24d7924fcffc23a2b8cc5ad50049808aa9455
This commit is contained in:
Maciej Żenczykowski 2021-10-11 10:42:27 -07:00
parent 0ef7e4e696
commit 02e8f2ba37
2 changed files with 9 additions and 6 deletions

View file

@ -7,12 +7,6 @@ function update_config() {
-d CPU_BIG_ENDIAN \
-d STM \
-d TEST_MEMCAT_P \
-d DEBUG_SPINLOCK \
-d DEBUG_LOCK_ALLOC \
-d LOCK_STAT \
-d DEBUG_WW_MUTEX_SLOWPATH \
-d DEBUG_LOCK_ALLOC \
-d PROVE_LOCKING \
-e UNWINDER_FRAME_POINTER \
(cd ${OUT_DIR} && \

View file

@ -472,6 +472,11 @@ struct sock {
u32 sk_ack_backlog;
u32 sk_max_ack_backlog;
kuid_t sk_uid;
#if IS_ENABLED(CONFIG_DEBUG_SPINLOCK) || IS_ENABLED(CONFIG_DEBUG_LOCK_ALLOC)
spinlock_t sk_peer_lock;
#else
/* sk_peer_lock is in the ANDROID_KABI_RESERVE(1) field below */
#endif
struct pid *sk_peer_pid;
const struct cred *sk_peer_cred;
@ -512,7 +517,11 @@ struct sock {
struct sock_reuseport __rcu *sk_reuseport_cb;
struct rcu_head sk_rcu;
#if IS_ENABLED(CONFIG_DEBUG_SPINLOCK) || IS_ENABLED(CONFIG_DEBUG_LOCK_ALLOC)
ANDROID_KABI_RESERVE(1);
#else
ANDROID_KABI_USE(1, spinlock_t sk_peer_lock);
#endif
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);