Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH net-next v2 09/12] net-timestamp: add tx OPT_ID_TCP support for bpf case
       [not found] <20241012040651.95616-10-kerneljasonxing@gmail.com>
@ 2024-10-15  8:40 ` kernel test robot
  2024-10-15  9:36   ` Jason Xing
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-10-15  8:40 UTC (permalink / raw)
  To: Jason Xing, davem, edumazet, kuba, pabeni, dsahern,
	willemdebruijn.kernel, willemb, ast, daniel, andrii, martin.lau,
	eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
	haoluo, jolsa
  Cc: llvm, oe-kbuild-all, bpf, netdev, Jason Xing

Hi Jason,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jason-Xing/net-timestamp-introduce-socket-tsflag-requestors/20241012-121010
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241012040651.95616-10-kerneljasonxing%40gmail.com
patch subject: [PATCH net-next v2 09/12] net-timestamp: add tx OPT_ID_TCP support for bpf case
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241015/202410151628.hcAdeahi-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241015/202410151628.hcAdeahi-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/202410151628.hcAdeahi-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/core/sock.c:926:2: warning: variable 'tsflags' is uninitialized when used here [-Wuninitialized]
     926 |         tsflags |= (sk->sk_tsflags[SOCKETOPT_TS_REQUESTOR] |
         |         ^~~~~~~
   net/core/sock.c:920:13: note: initialize the variable 'tsflags' to silence this warning
     920 |         u32 tsflags;
         |                    ^
         |                     = 0
   1 warning generated.


vim +/tsflags +926 net/core/sock.c

   917	
   918	int sock_set_tskey(struct sock *sk, int val, int type)
   919	{
   920		u32 tsflags;
   921	
   922		if (val & SOF_TIMESTAMPING_OPT_ID_TCP &&
   923		    !(val & SOF_TIMESTAMPING_OPT_ID))
   924			return -EINVAL;
   925	
 > 926		tsflags |= (sk->sk_tsflags[SOCKETOPT_TS_REQUESTOR] |
   927			    sk->sk_tsflags[BPFPROG_TS_REQUESTOR]);
   928		if (val & SOF_TIMESTAMPING_OPT_ID &&
   929		    !(tsflags & SOF_TIMESTAMPING_OPT_ID)) {
   930			if (sk_is_tcp(sk)) {
   931				if ((1 << sk->sk_state) &
   932				    (TCPF_CLOSE | TCPF_LISTEN))
   933					return -EINVAL;
   934				if (val & SOF_TIMESTAMPING_OPT_ID_TCP)
   935					atomic_set(&sk->sk_tskey, tcp_sk(sk)->write_seq);
   936				else
   937					atomic_set(&sk->sk_tskey, tcp_sk(sk)->snd_una);
   938			} else {
   939				atomic_set(&sk->sk_tskey, 0);
   940			}
   941		}
   942	
   943		return 0;
   944	}
   945	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v2 09/12] net-timestamp: add tx OPT_ID_TCP support for bpf case
  2024-10-15  8:40 ` [PATCH net-next v2 09/12] net-timestamp: add tx OPT_ID_TCP support for bpf case kernel test robot
@ 2024-10-15  9:36   ` Jason Xing
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Xing @ 2024-10-15  9:36 UTC (permalink / raw)
  To: kernel test robot
  Cc: davem, edumazet, kuba, pabeni, dsahern, willemdebruijn.kernel,
	willemb, ast, daniel, andrii, martin.lau, eddyz87, song,
	yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, llvm,
	oe-kbuild-all, bpf, netdev, Jason Xing

On Tue, Oct 15, 2024 at 4:41 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi Jason,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on net-next/main]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Jason-Xing/net-timestamp-introduce-socket-tsflag-requestors/20241012-121010
> base:   net-next/main
> patch link:    https://lore.kernel.org/r/20241012040651.95616-10-kerneljasonxing%40gmail.com
> patch subject: [PATCH net-next v2 09/12] net-timestamp: add tx OPT_ID_TCP support for bpf case
> config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241015/202410151628.hcAdeahi-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241015/202410151628.hcAdeahi-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/202410151628.hcAdeahi-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> net/core/sock.c:926:2: warning: variable 'tsflags' is uninitialized when used here [-Wuninitialized]
>      926 |         tsflags |= (sk->sk_tsflags[SOCKETOPT_TS_REQUESTOR] |
>          |         ^~~~~~~
>    net/core/sock.c:920:13: note: initialize the variable 'tsflags' to silence this warning
>      920 |         u32 tsflags;
>          |                    ^
>          |                     = 0
>    1 warning generated.

Thanks! I will fix it!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-15  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20241012040651.95616-10-kerneljasonxing@gmail.com>
2024-10-15  8:40 ` [PATCH net-next v2 09/12] net-timestamp: add tx OPT_ID_TCP support for bpf case kernel test robot
2024-10-15  9:36   ` Jason Xing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox