CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Kuniyuki Iwashima <[email protected]>
CC: Jakub Kicinski <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   c122052c3cb861b3e61a01d2c2ab9069e470663e
commit: afd20b9290e184c203fe22f2d6b80dc7127ba724 [3098/8462] af_unix: Replace 
the big lock with small locks.
:::::: branch date: 10 hours ago
:::::: commit date: 3 weeks ago
config: x86_64-rhel-8.3-kselftests 
(https://download.01.org/0day-ci/archive/20211218/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

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


cocci warnings: (new ones prefixed by >>)
>> net/unix/af_unix.c:3255:2-11: second lock on line 3255

vim +3255 net/unix/af_unix.c

7123aaa3a14165 Eric Dumazet      2012-06-08  3239  
7123aaa3a14165 Eric Dumazet      2012-06-08  3240  static struct sock 
*unix_next_socket(struct seq_file *seq,
7123aaa3a14165 Eric Dumazet      2012-06-08  3241                               
     struct sock *sk,
7123aaa3a14165 Eric Dumazet      2012-06-08  3242                               
     loff_t *pos)
7123aaa3a14165 Eric Dumazet      2012-06-08  3243  {
afd20b9290e184 Kuniyuki Iwashima 2021-11-24  3244       unsigned long bucket = 
get_bucket(*pos);
7123aaa3a14165 Eric Dumazet      2012-06-08  3245  
7123aaa3a14165 Eric Dumazet      2012-06-08  3246       while (sk > (struct 
sock *)SEQ_START_TOKEN) {
7123aaa3a14165 Eric Dumazet      2012-06-08  3247               sk = 
sk_next(sk);
7123aaa3a14165 Eric Dumazet      2012-06-08  3248               if (!sk)
7123aaa3a14165 Eric Dumazet      2012-06-08  3249                       goto 
next_bucket;
7123aaa3a14165 Eric Dumazet      2012-06-08  3250               if 
(sock_net(sk) == seq_file_net(seq))
7123aaa3a14165 Eric Dumazet      2012-06-08  3251                       return 
sk;
^1da177e4c3f41 Linus Torvalds    2005-04-16  3252       }
7123aaa3a14165 Eric Dumazet      2012-06-08  3253  
7123aaa3a14165 Eric Dumazet      2012-06-08  3254       do {
afd20b9290e184 Kuniyuki Iwashima 2021-11-24 @3255               
spin_lock(&unix_table_locks[bucket]);
7123aaa3a14165 Eric Dumazet      2012-06-08  3256               sk = 
unix_from_bucket(seq, pos);
7123aaa3a14165 Eric Dumazet      2012-06-08  3257               if (sk)
7123aaa3a14165 Eric Dumazet      2012-06-08  3258                       return 
sk;
7123aaa3a14165 Eric Dumazet      2012-06-08  3259  
7123aaa3a14165 Eric Dumazet      2012-06-08  3260  next_bucket:
afd20b9290e184 Kuniyuki Iwashima 2021-11-24  3261               
spin_unlock(&unix_table_locks[bucket++]);
7123aaa3a14165 Eric Dumazet      2012-06-08  3262               *pos = 
set_bucket_offset(bucket, 1);
7123aaa3a14165 Eric Dumazet      2012-06-08  3263       } while (bucket < 
ARRAY_SIZE(unix_socket_table));
7123aaa3a14165 Eric Dumazet      2012-06-08  3264  
^1da177e4c3f41 Linus Torvalds    2005-04-16  3265       return NULL;
^1da177e4c3f41 Linus Torvalds    2005-04-16  3266  }
^1da177e4c3f41 Linus Torvalds    2005-04-16  3267  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to