Re: [PATCH net-next v6 3/6] net: devmem: prepare for autorelease rx token management

kernel test robot
2025-11-05T16:05:02Z

Hi Bobby,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 255d75ef029f33f75fcf5015052b7302486f7ad2]

url: https://github.com/intel-lab-lkp/linux/commits/Bobby-Eshleman/net-devmem-rename-tx_vec-to-vec-in-dmabuf-binding/20251105-092703
base: 255d75ef029f33f75fcf5015052b7302486f7ad2
patch link: https://lore.kernel.org/r/20251104-scratch-bobbyeshleman-devmem-tcp-token-upstream-v6-3-ea98cf4d40b3%40meta.com
patch subject: [PATCH net-next v6 3/6] net: devmem: prepare for autorelease rx token management
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251105/202511052307.doTV8fDn-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511052307.doTV8fDn-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511052307.doTV8fDn-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/core/sock.c:1107:12: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
1107 | return ret;
| ^~~
net/core/sock.c:1095:9: note: initialize the variable 'ret' to silence this warning
1095 | int ret;
| ^
| = 0
1 warning generated.
--
>> net/ipv4/tcp.c:2626:6: warning: variable 'refs' is uninitialized when used here [-Wuninitialized]
2626 | refs++;
| ^~~~
net/ipv4/tcp.c:2496:10: note: initialize the variable 'refs' to silence this warning
2496 | int refs;
| ^
| = 0
1 warning generated.

vim +/ret +1107 net/core/sock.c

1085
1086 static noinline_for_stack int
1087 sock_devmem_dontneed_manual_release(struct sock *sk, struct dmabuf_token *tokens,
1088 unsigned int num_tokens)
1089 {
1090 struct net_iov *niov;
1091 unsigned int i, j;
1092 netmem_ref netmem;
1093 unsigned int token;
1094 int num_frags = 0;
1095 int ret;
1096
1097 if (!sk->sk_devmem_info.binding)
1098 return -EINVAL;
1099
1100 for (i = 0; i < num_tokens; i++) {
1101 for (j = 0; j < tokens[i].token_count; j++) {
1102 token = tokens[i].token_start + j;
1103 if (token >= sk->sk_devmem_info.binding->dmabuf->size / PAGE_SIZE)
1104 break;
1105
1106 if (++num_frags > MAX_DONTNEED_FRAGS)
> 1107 return ret;
1108
1109 niov = sk->sk_devmem_info.binding->vec[token];
1110 if (atomic_dec_and_test(&niov->uref)) {
1111 netmem = net_iov_to_netmem(niov);
1112 WARN_ON_ONCE(!napi_pp_put_page(netmem));
1113 }
1114 ret++;
1115 }
1116 }
1117
1118 atomic_sub(ret, &sk->sk_devmem_info.outstanding_urefs);
1119
1120 return ret;
1121 }
1122

--
0-DAY CI Kernel Test Service