From: Dan Carpenter <dan.carpenter at oracle.com>
To: mptcp at lists.01.org
Subject: [MPTCP] [mptcp:export 1339/1352] net/mptcp/options.c:687 mptcp_established_options_rm_addr() error: uninitialized symbol 'align'.
Date: Mon, 15 Feb 2021 15:21:21 +0300 [thread overview]
Message-ID: <20210215122121.GH2087@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3236 bytes --]
tree: https://github.com/multipath-tcp/mptcp_net-next.git export
head: d15532665bd1e4a0e210110b275658ba4fcb5b87
commit: 7619397044315f5289200ea122ce4aac316d30da [1339/1352] mptcp: add rm_list in mptcp_out_options
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
net/mptcp/options.c:687 mptcp_established_options_rm_addr() error: uninitialized symbol 'align'.
vim +/align +687 net/mptcp/options.c
5cb104ae55e9db Geliang Tang 2020-09-24 668 static bool mptcp_established_options_rm_addr(struct sock *sk,
5cb104ae55e9db Geliang Tang 2020-09-24 669 unsigned int *size,
5cb104ae55e9db Geliang Tang 2020-09-24 670 unsigned int remaining,
5cb104ae55e9db Geliang Tang 2020-09-24 671 struct mptcp_out_options *opts)
5cb104ae55e9db Geliang Tang 2020-09-24 672 {
5cb104ae55e9db Geliang Tang 2020-09-24 673 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
5cb104ae55e9db Geliang Tang 2020-09-24 674 struct mptcp_sock *msk = mptcp_sk(subflow->conn);
7619397044315f Geliang Tang 2021-02-12 675 struct mptcp_rm_list rm_list;
7619397044315f Geliang Tang 2021-02-12 676 u8 i, align;
5cb104ae55e9db Geliang Tang 2020-09-24 677
5cb104ae55e9db Geliang Tang 2020-09-24 678 if (!mptcp_pm_should_rm_signal(msk) ||
7619397044315f Geliang Tang 2021-02-12 679 !(mptcp_pm_rm_addr_signal(msk, remaining, &rm_list)))
5cb104ae55e9db Geliang Tang 2020-09-24 680 return false;
5cb104ae55e9db Geliang Tang 2020-09-24 681
7619397044315f Geliang Tang 2021-02-12 682 if (rm_list.nr > 1)
7619397044315f Geliang Tang 2021-02-12 683 align = 5;
7619397044315f Geliang Tang 2021-02-12 684 if (rm_list.nr > 5)
7619397044315f Geliang Tang 2021-02-12 685 align = 9;
Can rm_list.nr be zero?
Smatch will hopefully know the answer if you have the cross function DB
built, but hopefully eventually we will turn these warnings on for GCC
again.
7619397044315f Geliang Tang 2021-02-12 686
7619397044315f Geliang Tang 2021-02-12 @687 if (remaining < TCPOLEN_MPTCP_RM_ADDR_BASE + align)
5cb104ae55e9db Geliang Tang 2020-09-24 688 return false;
5cb104ae55e9db Geliang Tang 2020-09-24 689
7619397044315f Geliang Tang 2021-02-12 690 *size = TCPOLEN_MPTCP_RM_ADDR_BASE + align;
5cb104ae55e9db Geliang Tang 2020-09-24 691 opts->suboptions |= OPTION_MPTCP_RM_ADDR;
7619397044315f Geliang Tang 2021-02-12 692 opts->rm_list = rm_list;
5cb104ae55e9db Geliang Tang 2020-09-24 693
7619397044315f Geliang Tang 2021-02-12 694 for (i = 0; i < opts->rm_list.nr; i++)
7619397044315f Geliang Tang 2021-02-12 695 pr_debug("rm_list_ids[%d]=%d", i, opts->rm_list.ids[i]);
5cb104ae55e9db Geliang Tang 2020-09-24 696
5cb104ae55e9db Geliang Tang 2020-09-24 697 return true;
5cb104ae55e9db Geliang Tang 2020-09-24 698 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37196 bytes --]
reply other threads:[~2021-02-15 12:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210215122121.GH2087@kadam \
--to=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox