ClangBuiltLinux / thread-safety-analysis

A research project into applying Clang's Thread Safety Analysis to the Linux Kernel
Other
6 stars 0 forks source link

kernel/rcu/srcutree.c: srcu_advance_state: analysis must understand underlying state machine #160

Open bulwahn opened 4 years ago

bulwahn commented 4 years ago
kernel/rcu/srcutree.c:1152:1: warning: mutex 'ssp->srcu_gp_mutex' is not held on every path through here [-Wthread-safety-analysis]
}
^
kernel/rcu/srcutree.c:1098:2: note: mutex acquired here
        mutex_lock(&ssp->srcu_gp_mutex);
        ^

The whole locking and unlocking is strongly entangled here with the underlying state machine of the function.