Hi Paolo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mptcp/export]
[also build test WARNING on kselftest/next linus/master v5.14-rc1 next-20210713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Paolo-Abeni/mptcp-refactor-activ...
base:
https://github.com/multipath-tcp/mptcp_net-next.git export
config: x86_64-randconfig-r006-20210713 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
8d69635ed9ecf36fd0ca85906bfde17949671cbe)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://github.com/0day-ci/linux/commit/bc57ec20ec19b4d0b6de45ef1df8c8c36...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Paolo-Abeni/mptcp-refactor-active-backup/20210714-051541
git checkout bc57ec20ec19b4d0b6de45ef1df8c8c3685c7fe2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> net/mptcp/pm_netlink.c:924:8: warning: variable 'push' is
used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (!tcp_rtx_and_write_queues_empty(ssk)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/mptcp/pm_netlink.c:931:8: note: uninitialized use occurs here
if (push)
^~~~
net/mptcp/pm_netlink.c:924:4: note: remove the 'if' if its condition is always
true
if (!tcp_rtx_and_write_queues_empty(ssk)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/mptcp/pm_netlink.c:911:17: note: initialize the variable 'push' to silence
this warning
bool slow, push;
^
= 0
1 warning generated.
vim +924 net/mptcp/pm_netlink.c
903
904 void mptcp_pm_nl_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
905 {
906 struct mptcp_subflow_context *iter, *subflow = mptcp_subflow_ctx(ssk);
907 struct sock *sk = (struct sock *)msk;
908 unsigned int active_max_loss_cnt;
909 struct net *net = sock_net(sk);
910 unsigned int stale_loss_cnt;
911 bool slow, push;
912
913 stale_loss_cnt = mptcp_stale_loss_cnt(net);
914 if (subflow->stale || !stale_loss_cnt || subflow->stale_count <=
stale_loss_cnt)
915 return;
916
917 /* look for another available subflow not in loss state */
918 active_max_loss_cnt = max_t(int, stale_loss_cnt - 1, 1);
919 mptcp_for_each_subflow(msk, iter) {
920 if (iter != subflow && mptcp_subflow_active(iter) &&
921 iter->stale_count < active_max_loss_cnt) {
922 /* we have some alteratives, try to mark this subflow as idle ...*/
923 slow = lock_sock_fast(ssk);
924 if (!tcp_rtx_and_write_queues_empty(ssk)) {
925 subflow->stale = 1;
926 push = __mptcp_retransmit_pending_data(sk);
927 }
928 unlock_sock_fast(ssk, slow);
929
930 /* pending data on the idle subflow: retransmit */
931 if (push)
932 __mptcp_push_pending(sk, 0);
933 return;
934 }
935 }
936 }
937
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org