Thread (6 messages) flat view 6 messages, 5 authors, 15d ago

Re: [PATCH net] psp: use unrcu_pointer() for the cmpxchg() on netdev psp_dev

From: Daniel Zahka <daniel.zahka@gmail.com>
Date: 2026-08-13 19:57:39
Also in: lkml


On 8/13/26 3:34 PM, Wei Wang wrote:
From: Wei Wang <redacted>

sparse reports:

   net/psp/psp_nl.c:513:13: sparse: sparse: cast removes address space
   '__rcu' of expression

cmpxchg() returns typeof(*ptr) and its internal casts strip the __rcu
annotation. Wrap it in unrcu_pointer(), the documented way to use an
__rcu pointer with xchg() and friends.

This was introduced by commit 06c2dce2d0f6 ("psp: add new netlink cmd
for dev-assoc and dev-disassoc").

No functional change intended.

Reported-by: kernel test robot <redacted>
Closes: https://lore.kernel.org/oe-kbuild-all/202608080910.l9KvOH7O-lkp@intel.com/ (local)
Signed-off-by: Wei Wang <redacted>
Commits targeting the net tree need a fixes tag.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help