From: kernel test robot <lkp@intel.com>
To: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Will Deacon <will@kernel.org>
Subject: net/mptcp/pm_netlink.c:256:9: sparse: sparse: context imbalance in 'mptcp_pm_nl_add_addr_received' - unexpected unlock
Date: Wed, 2 Sep 2020 21:20:24 +0800 [thread overview]
Message-ID: <202009022121.b8uKHyhI%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4171 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9c7d619be5a002ea29c172df5e3c1227c22cbb41
commit: 203b1152d18c04823f73b843eb3b0ad646e4dbb2 arm64/crash_core: Export KERNELPACMASK in vmcoreinfo
date: 4 months ago
config: arm64-randconfig-s031-20200902 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 203b1152d18c04823f73b843eb3b0ad646e4dbb2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
net/mptcp/pm_netlink.c:209:25: sparse: sparse: context imbalance in 'mptcp_pm_create_subflow_or_signal_addr' - unexpected unlock
>> net/mptcp/pm_netlink.c:256:9: sparse: sparse: context imbalance in 'mptcp_pm_nl_add_addr_received' - unexpected unlock
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=203b1152d18c04823f73b843eb3b0ad646e4dbb2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 203b1152d18c04823f73b843eb3b0ad646e4dbb2
vim +/mptcp_pm_nl_add_addr_received +256 net/mptcp/pm_netlink.c
01cacb00b35cb6 Paolo Abeni 2020-03-27 234
01cacb00b35cb6 Paolo Abeni 2020-03-27 235 void mptcp_pm_nl_add_addr_received(struct mptcp_sock *msk)
01cacb00b35cb6 Paolo Abeni 2020-03-27 236 {
01cacb00b35cb6 Paolo Abeni 2020-03-27 237 struct sock *sk = (struct sock *)msk;
01cacb00b35cb6 Paolo Abeni 2020-03-27 238 struct mptcp_addr_info remote;
01cacb00b35cb6 Paolo Abeni 2020-03-27 239 struct mptcp_addr_info local;
01cacb00b35cb6 Paolo Abeni 2020-03-27 240
01cacb00b35cb6 Paolo Abeni 2020-03-27 241 pr_debug("accepted %d:%d remote family %d",
01cacb00b35cb6 Paolo Abeni 2020-03-27 242 msk->pm.add_addr_accepted, msk->pm.add_addr_accept_max,
01cacb00b35cb6 Paolo Abeni 2020-03-27 243 msk->pm.remote.family);
01cacb00b35cb6 Paolo Abeni 2020-03-27 244 msk->pm.add_addr_accepted++;
01cacb00b35cb6 Paolo Abeni 2020-03-27 245 msk->pm.subflows++;
01cacb00b35cb6 Paolo Abeni 2020-03-27 246 if (msk->pm.add_addr_accepted >= msk->pm.add_addr_accept_max ||
01cacb00b35cb6 Paolo Abeni 2020-03-27 247 msk->pm.subflows >= msk->pm.subflows_max)
01cacb00b35cb6 Paolo Abeni 2020-03-27 248 WRITE_ONCE(msk->pm.accept_addr, false);
01cacb00b35cb6 Paolo Abeni 2020-03-27 249
01cacb00b35cb6 Paolo Abeni 2020-03-27 250 /* connect to the specified remote address, using whatever
01cacb00b35cb6 Paolo Abeni 2020-03-27 251 * local address the routing configuration will pick.
01cacb00b35cb6 Paolo Abeni 2020-03-27 252 */
01cacb00b35cb6 Paolo Abeni 2020-03-27 253 remote = msk->pm.remote;
01cacb00b35cb6 Paolo Abeni 2020-03-27 254 if (!remote.port)
01cacb00b35cb6 Paolo Abeni 2020-03-27 255 remote.port = sk->sk_dport;
01cacb00b35cb6 Paolo Abeni 2020-03-27 @256 memset(&local, 0, sizeof(local));
01cacb00b35cb6 Paolo Abeni 2020-03-27 257 local.family = remote.family;
01cacb00b35cb6 Paolo Abeni 2020-03-27 258
01cacb00b35cb6 Paolo Abeni 2020-03-27 259 spin_unlock_bh(&msk->pm.lock);
01cacb00b35cb6 Paolo Abeni 2020-03-27 260 __mptcp_subflow_connect((struct sock *)msk, 0, &local, &remote);
01cacb00b35cb6 Paolo Abeni 2020-03-27 261 spin_lock_bh(&msk->pm.lock);
01cacb00b35cb6 Paolo Abeni 2020-03-27 262 }
01cacb00b35cb6 Paolo Abeni 2020-03-27 263
:::::: The code at line 256 was first introduced by commit
:::::: 01cacb00b35cb62b139f07d5f84bcf0eeda8eff6 mptcp: add netlink-based PM
:::::: TO: Paolo Abeni <pabeni@redhat.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33530 bytes --]
reply other threads:[~2020-09-02 15:41 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=202009022121.b8uKHyhI%lkp@intel.com \
--to=lkp@intel.com \
--cc=amit.kachhap@arm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®