From 8853c7995c99c6899ce66f8a3be8c8d7317b3f28 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 12 May 2023 13:14:41 +0000 Subject: [PATCH] ANDROID: fix up android selinux build break. In commit e67b79850fcc ("selinux: stop passing selinux_state pointers and their offspring"), the selinux state pointers were switched to a global pointer. This breaks the out-of-tree android networking state status logic, so switch it over to use the correct global selinux state structure instead. Fixes: e67b79850fcc ("selinux: stop passing selinux_state pointers and their offspring") Change-Id: Iaf1a7a7824bffd1c074e3d3a43b4608d8138a9f4 Signed-off-by: Greg Kroah-Hartman --- security/selinux/ss/services.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 4df19d6d9b59..c5ef4007aa00 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -2126,8 +2126,8 @@ static void security_load_policycaps(struct selinux_policy *policy) i); } - state->android_netlink_route = p->android_netlink_route; - state->android_netlink_getneigh = p->android_netlink_getneigh; + selinux_state.android_netlink_route = p->android_netlink_route; + selinux_state.android_netlink_getneigh = p->android_netlink_getneigh; selinux_nlmsg_init(); }