[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89i+2Jv71p-fVgdKHUYyTSr7d567njPM1inxs=YR1ZgBj7Q@mail.gmail.com>
Date: Thu, 13 Nov 2025 12:22:01 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: kernel test robot <lkp@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>, Maciej Żenczykowski <maze@...gle.com>
Subject: Re: include/net/sock.h:2098:16: sparse: sparse: cast from non-scalar
On Thu, Nov 13, 2025 at 12:19 PM kernel test robot <lkp@...el.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 2ccec5944606ee1389abc7ee41986825c6ceb574
> commit: c51da3f7a161c6822232be832abdffe47eb55b4c net: remove sock_i_uid()
> date: 5 months ago
> config: alpha-randconfig-r123-20251113 (https://download.01.org/0day-ci/archive/20251114/202511140407.VnaDOCI3-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 11.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251114/202511140407.VnaDOCI3-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202511140407.VnaDOCI3-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> net/llc/llc_proc.c:56:9: sparse: sparse: context imbalance in 'llc_get_sk_idx' - wrong count at exit
> net/llc/llc_proc.c:102:23: sparse: sparse: context imbalance in 'llc_seq_next' - unexpected unlock
> net/llc/llc_proc.c:117:17: sparse: sparse: context imbalance in 'llc_seq_stop' - unexpected unlock
> net/llc/llc_proc.c: note: in included file:
> include/net/sock.h:2098:16: sparse: sparse: cast to non-scalar
> >> include/net/sock.h:2098:16: sparse: sparse: cast from non-scalar
>
> vim +2098 include/net/sock.h
>
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 2094
> e84a4927a404f3 Eric Dumazet 2025-06-20 2095 static inline kuid_t sk_uid(const struct sock *sk)
> e84a4927a404f3 Eric Dumazet 2025-06-20 2096 {
> e84a4927a404f3 Eric Dumazet 2025-06-20 2097 /* Paired with WRITE_ONCE() in sockfs_setattr() */
> e84a4927a404f3 Eric Dumazet 2025-06-20 @2098 return READ_ONCE(sk->sk_uid);
> e84a4927a404f3 Eric Dumazet 2025-06-20 2099 }
> e84a4927a404f3 Eric Dumazet 2025-06-20 2100
>
> :::::: The code at line 2098 was first introduced by commit
> :::::: e84a4927a404f369c842c19de93b216627fcc690 net: annotate races around sk->sk_uid
>
> :::::: TO: Eric Dumazet <edumazet@...gle.com>
> :::::: CC: Jakub Kicinski <kuba@...nel.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
I gave a solution a while back, no answer, meaning that alpha is dead.
I would suggest kernel test robot stop bothering.
diff --git a/arch/alpha/include/asm/rwonce.h b/arch/alpha/include/asm/rwonce.h
index 35542bcf92b3a883df353784bcb2d243475ccd91..b6801cd2ace962e11624737ed334a5aeb30478b7
100644
--- a/arch/alpha/include/asm/rwonce.h
+++ b/arch/alpha/include/asm/rwonce.h
@@ -22,10 +22,10 @@
*/
#define __READ_ONCE(x) \
({ \
- __unqual_scalar_typeof(x) __x = \
- (*(volatile typeof(__x) *)(&(x))); \
+ __auto_type __x = \
+ (*(const volatile __unqual_scalar_typeof(x) *)&(x)); \
mb(); \
- (typeof(x))__x; \
+ __x; \
})
#endif /* CONFIG_SMP */
Powered by blists - more mailing lists