* net/mptcp/pm_netlink.c:256:9: sparse: sparse: context imbalance in 'mptcp_pm_nl_add_addr_received' - unexpected unlock
@ 2020-09-02 13:20 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-02 13:20 UTC (permalink / raw)
To: Amit Daniel Kachhap; +Cc: kbuild-all, linux-kernel, Will Deacon
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-02 15:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 13:20 net/mptcp/pm_netlink.c:256:9: sparse: sparse: context imbalance in 'mptcp_pm_nl_add_addr_received' - unexpected unlock kernel test robot
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®