CC: [email protected]
CC: [email protected]
TO: "Florian, Westphal," <[email protected]>
CC: Mat Martineau <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   d6f9469a03d832dcd17041ed67774ffb5f3e73b3
commit: 2e52213c79c0b94aff42ba898ad9ad57546be67d mptcp: avoid work queue 
scheduling if possible
date:   3 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 3 months ago
config: h8300-randconfig-s032-20200603 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-244-g0ee050a8-dirty
        git checkout 2e52213c79c0b94aff42ba898ad9ad57546be67d
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=h8300 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)

>> net/mptcp/protocol.c:207:13: sparse: sparse: context imbalance in 
>> 'move_skbs_to_msk' - different lock contexts for basic block
   net/mptcp/protocol.c:861:25: sparse: sparse: context imbalance in 
'mptcp_accept' - unexpected unlock

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2e52213c79c0b94aff42ba898ad9ad57546be67d
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 2e52213c79c0b94aff42ba898ad9ad57546be67d
vim +/move_skbs_to_msk +207 net/mptcp/protocol.c

6771bfd9ee2460c Florian Westphal 2020-02-26  203  
2e52213c79c0b94 Florian Westphal 2020-02-26  204  /* In most cases we will be 
able to lock the mptcp socket.  If its already
2e52213c79c0b94 Florian Westphal 2020-02-26  205   * owned, we need to defer to 
the work queue to avoid ABBA deadlock.
2e52213c79c0b94 Florian Westphal 2020-02-26  206   */
2e52213c79c0b94 Florian Westphal 2020-02-26 @207  static bool 
move_skbs_to_msk(struct mptcp_sock *msk, struct sock *ssk)
2e52213c79c0b94 Florian Westphal 2020-02-26  208  {
2e52213c79c0b94 Florian Westphal 2020-02-26  209        struct sock *sk = 
(struct sock *)msk;
2e52213c79c0b94 Florian Westphal 2020-02-26  210        unsigned int moved = 0;
2e52213c79c0b94 Florian Westphal 2020-02-26  211  
2e52213c79c0b94 Florian Westphal 2020-02-26  212        if 
(READ_ONCE(sk->sk_lock.owned))
2e52213c79c0b94 Florian Westphal 2020-02-26  213                return false;
2e52213c79c0b94 Florian Westphal 2020-02-26  214  
2e52213c79c0b94 Florian Westphal 2020-02-26  215        if 
(unlikely(!spin_trylock_bh(&sk->sk_lock.slock)))
2e52213c79c0b94 Florian Westphal 2020-02-26  216                return false;
2e52213c79c0b94 Florian Westphal 2020-02-26  217  
2e52213c79c0b94 Florian Westphal 2020-02-26  218        /* must re-check after 
taking the lock */
2e52213c79c0b94 Florian Westphal 2020-02-26  219        if 
(!READ_ONCE(sk->sk_lock.owned))
2e52213c79c0b94 Florian Westphal 2020-02-26  220                
__mptcp_move_skbs_from_subflow(msk, ssk, &moved);
2e52213c79c0b94 Florian Westphal 2020-02-26  221  
2e52213c79c0b94 Florian Westphal 2020-02-26  222        
spin_unlock_bh(&sk->sk_lock.slock);
2e52213c79c0b94 Florian Westphal 2020-02-26  223  
2e52213c79c0b94 Florian Westphal 2020-02-26  224        return moved > 0;
2e52213c79c0b94 Florian Westphal 2020-02-26  225  }
2e52213c79c0b94 Florian Westphal 2020-02-26  226  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to