Re: [PATCH net] psp: use unrcu_pointer() for the cmpxchg() on netdev psp_dev
Wei Wang <[email protected]>
| Newsgroups | gmane.linux.network,gmane.linux.kernel |
|---|---|
| Message-ID | <CADe0Y=sQ0e=snxJBd6kBz08eYR4BrX_9Xbr=XEHGVcXzybfQow@mail.gmail.com> |
On Thu, Aug 13, 2026 at 12:57 PM Daniel Zahka <[email protected]> wrote: > > > > > > On 8/13/26 3:34 PM, Wei Wang wrote: > > From: Wei Wang <[email protected]> > > > > 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 <[email protected]> > > Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ > > Signed-off-by: Wei Wang <[email protected]> > Commits targeting the net tree need a fixes tag. This is a sparse warning fix, my understanding is that it's not a functional fix and therefore should not use a Fixes tag. Please let me know if my understanding is wrong.