From a7d161dc5af1f295d3ff5940cb3de08edae5e7e5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 25 May 2021 13:21:26 +0200 Subject: [PATCH] ANDROID: GKI: device.h: add rcu_head back to struct device_link Commit 80dd33cf72d1 ("drivers: base: Fix device link removal") upstream drops the rcu_head from struct device_link. But we want to drag it back here in the Android GKI kernel to be 'safe' for future changes where we might want to switch back to the old method if testing does not work out well. This allows us to switch between the different methods in an ABI compatible way. Bug: 161946584 Reported-by: Saravana Kannan Signed-off-by: Greg Kroah-Hartman Change-Id: If4a56bae6eebe3de5764052b603162071e81bce3 --- include/linux/device.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index 5ec9be377a76..4e1e42798879 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -579,6 +579,10 @@ struct device_link { u32 flags; refcount_t rpm_active; struct kref kref; +#ifdef CONFIG_SRCU + /* Not currently used, here for potential abi issues in the future */ + struct rcu_head rcu_head; +#endif struct work_struct rm_work; bool supplier_preactivated; /* Owned by consumer probe. */ ANDROID_KABI_RESERVE(1);