CC: [email protected]
CC: [email protected]
TO: Manfred Spraul <[email protected]>
CC: 0day robot <[email protected]>

Hi Manfred,

First bad commit (maybe != root cause):

tree:   
https://github.com/0day-ci/linux/commits/UPDATE-20210821-034214/Rafael-Aquini/ipc-replace-costly-bailout-check-in-sysvipc_find_ipc/20210810-043723
head:   a7e49d3717b678a71049996d24ccecfc3cdb0aa1
commit: a7e49d3717b678a71049996d24ccecfc3cdb0aa1 ipc: replace costly bailout 
check in sysvipc_find_ipc()
date:   25 hours ago
:::::: branch date: 25 hours ago
:::::: commit date: 25 hours ago
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # 
https://github.com/0day-ci/linux/commit/a7e49d3717b678a71049996d24ccecfc3cdb0aa1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
UPDATE-20210821-034214/Rafael-Aquini/ipc-replace-costly-bailout-check-in-sysvipc_find_ipc/20210810-043723
        git checkout a7e49d3717b678a71049996d24ccecfc3cdb0aa1
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir 
ARCH=x86_64 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
   ipc/util.c:171:29: sparse: sparse: context imbalance in 'ipc_findkey' - 
wrong count at exit
   ipc/util.c:277:5: sparse: sparse: context imbalance in 'ipc_addid' - 
different lock contexts for basic block
   ipc/util.c:431:27: sparse: sparse: context imbalance in 'ipcget_public' - 
unexpected unlock
>> ipc/util.c:778:9: sparse: sparse: context imbalance in 'sysvipc_find_ipc' - 
>> wrong count at exit
   ipc/util.c:789:27: sparse: sparse: context imbalance in 'sysvipc_proc_next' 
- unexpected unlock
   ipc/util.c:833:27: sparse: sparse: context imbalance in 'sysvipc_proc_stop' 
- unexpected unlock

vim +/sysvipc_find_ipc +778 ipc/util.c

03f1fc09180b34 Eric W. Biederman 2018-03-23  750  
7ca7e564e049d8 Nadia Derbey      2007-10-18  751  /*
a7e49d3717b678 Manfred Spraul    2021-08-20  752   * This routine locks the ipc 
structure found at least at index pos.
7ca7e564e049d8 Nadia Derbey      2007-10-18  753   */
b524b9adb3f655 Adrian Bunk       2008-02-06  754  static struct kern_ipc_perm 
*sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos,
7ca7e564e049d8 Nadia Derbey      2007-10-18  755                                
              loff_t *new_pos)
ae7817745eef3b Mike Waychison    2005-09-06  756  {
a7e49d3717b678 Manfred Spraul    2021-08-20  757        int tmpidx;
7ca7e564e049d8 Nadia Derbey      2007-10-18  758        struct kern_ipc_perm 
*ipc;
73ea41302bab5e Kirill Korotaev   2006-10-02  759  
a7e49d3717b678 Manfred Spraul    2021-08-20  760        tmpidx = pos;
ae7817745eef3b Mike Waychison    2005-09-06  761  
a7e49d3717b678 Manfred Spraul    2021-08-20  762        ipc = 
idr_get_next(&ids->ipcs_idr, &tmpidx);
7ca7e564e049d8 Nadia Derbey      2007-10-18  763        if (ipc != NULL) {
32a27500109812 Davidlohr Bueso   2013-09-11  764                rcu_read_lock();
32a27500109812 Davidlohr Bueso   2013-09-11  765                
ipc_lock_object(ipc);
a7e49d3717b678 Manfred Spraul    2021-08-20  766                /*
a7e49d3717b678 Manfred Spraul    2021-08-20  767                 * We found the 
object with the index tmpidx.
a7e49d3717b678 Manfred Spraul    2021-08-20  768                 * For next 
search, start with tmpidx+1
a7e49d3717b678 Manfred Spraul    2021-08-20  769                 */
a7e49d3717b678 Manfred Spraul    2021-08-20  770                *new_pos = 
tmpidx + 1;
a7e49d3717b678 Manfred Spraul    2021-08-20  771        } else {
a7e49d3717b678 Manfred Spraul    2021-08-20  772                /*
a7e49d3717b678 Manfred Spraul    2021-08-20  773                 * EOF. 
seq_file can't notice that, thus
a7e49d3717b678 Manfred Spraul    2021-08-20  774                 * move the 
offset by one.
a7e49d3717b678 Manfred Spraul    2021-08-20  775                 */
5e698222c70257 Vasily Averin     2020-05-13  776                *new_pos = pos 
+ 1;
a7e49d3717b678 Manfred Spraul    2021-08-20  777        }
5e698222c70257 Vasily Averin     2020-05-13 @778        return ipc;
ae7817745eef3b Mike Waychison    2005-09-06  779  }
ae7817745eef3b Mike Waychison    2005-09-06  780  

---
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