diff --git a/net/psp/psp_nl.c b/net/psp/psp_nl.c index 43b066353c65..f91665748dde 100644 --- a/net/psp/psp_nl.c +++ b/net/psp/psp_nl.c @@ -533,7 +533,8 @@ int psp_nl_dev_assoc_doit(struct sk_buff *skb, struct genl_info *info) } /* Check if device is already associated with a PSP device */ - if (cmpxchg(&assoc_dev->psp_dev, NULL, RCU_INITIALIZER(psd))) { + if (unrcu_pointer(cmpxchg(&assoc_dev->psp_dev, NULL, + RCU_INITIALIZER(psd)))) { NL_SET_ERR_MSG(info->extack, "Device already associated with a PSP device"); err = -EBUSY;