OSDN Git Service

ANDROID: GKI: sock.h: add Android ABI padding to some structures
authorGreg Kroah-Hartman <gregkh@google.com>
Tue, 10 Mar 2020 17:38:43 +0000 (18:38 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 1 May 2020 13:18:11 +0000 (15:18 +0200)
Try to mitigate potential future driver core api changes by adding a
padding to struct sock.

Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I61c3d6cf12c087345db71fc6d93ee6bd58969003

include/net/sock.h

index f359e5c..0d66760 100644 (file)
@@ -73,6 +73,7 @@
 #include <linux/net_tstamp.h>
 #include <net/smc.h>
 #include <net/l3mdev.h>
+#include <linux/android_kabi.h>
 
 /*
  * This structure really needs to be cleaned up.
@@ -509,6 +510,15 @@ struct sock {
        void                    (*sk_destruct)(struct sock *sk);
        struct sock_reuseport __rcu     *sk_reuseport_cb;
        struct rcu_head         sk_rcu;
+
+       ANDROID_KABI_RESERVE(1);
+       ANDROID_KABI_RESERVE(2);
+       ANDROID_KABI_RESERVE(3);
+       ANDROID_KABI_RESERVE(4);
+       ANDROID_KABI_RESERVE(5);
+       ANDROID_KABI_RESERVE(6);
+       ANDROID_KABI_RESERVE(7);
+       ANDROID_KABI_RESERVE(8);
 };
 
 enum sk_pacing {