diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index bf1c35f3deb631648d9b69f8d77ff10cdae578cc..66dc19746c639648574067d3d52700781843caf5 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -68,7 +68,7 @@ static void tcf_set_action_cookie(struct tc_cookie __rcu **old_cookie,
 {
 	struct tc_cookie *old;
 
-	old = xchg(old_cookie, new_cookie);
+	old = xchg((__force struct tc_cookie **)old_cookie, new_cookie);
 	if (old)
 		call_rcu(&old->rcu, tcf_free_cookie_rcu);
 }