From da08c217d80d6a6b1f23354a08a75f70f89c3976 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 24 May 2024 14:12:38 +0000 Subject: [PATCH] ANDROID: preserve CRC values in struct sk_buff due to ip_defrag_offset removal In commit 7d0567842b78 ("inet: inet_defrag: prevent sk release while still in use"), the ip_defrag_offset variable was removed from the union in struct sk_buff and moved to an internal-to-the-network-stack location in order to resolve an issue. This does not change the structure size, but the ABI tracking logic doesn't appreciate the variable going away, so add the union back. No functional changes here as no external code could ever use the ip_defrag_offset variable as seen in the commit that changed this. Bug: 161946584 Fixes: 7d0567842b78 ("inet: inet_defrag: prevent sk release while still in use") Change-Id: Id09f9398f41d9dbe9742807495d260e1f7a7a516 Signed-off-by: Greg Kroah-Hartman --- include/linux/skbuff.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a9e8875e3394..bcf948920812 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -872,7 +872,15 @@ struct sk_buff { struct llist_node ll_node; }; - struct sock *sk; + /* ANDROID: + * Put back the union removed in commit 7d0567842b78 ("inet: + * inet_defrag: prevent sk release while still in use") to preserve the + * crcs of stuff. Does not affect any code functionality. + */ + union { + struct sock *sk; + int ip_defrag_offset; + }; union { ktime_t tstamp;