From eff6517b1e1c047da9a3cdf5a1abde08aae8c48d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 2 May 2020 09:37:37 +0200 Subject: [PATCH] ANDROID: GKI: genhd.h: add Android ABI padding to some structures Try to mitigate potential future driver core api changes by adding a padding to struct hd_struct, struct blk_integrity, and struct gendisk. Based on a change made to the RHEL/CENTOS 8 kernel. Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: I5d19bf942fbedc64f705f5d27ae629c57209df27 --- include/linux/genhd.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 03da3f603d30..8935b1e63ada 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #define dev_to_disk(device) container_of((device), struct gendisk, part0.__dev) @@ -73,6 +74,11 @@ struct hd_struct { int make_it_fail; #endif struct rcu_work rcu_work; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); }; /** @@ -162,6 +168,9 @@ struct blk_integrity { unsigned char tuple_size; unsigned char interval_exp; unsigned char tag_size; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); }; struct gendisk { @@ -208,6 +217,12 @@ struct gendisk { int node_id; struct badblocks *bb; struct lockdep_map lockdep_map; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); + }; #if IS_REACHABLE(CONFIG_CDROM)