/home/himanshu/clang-thread-safety-analysis/kernel/sched/fair.c:9487:7: warning: mutex 'balancing' is not held on every path through here [-Wthread-safety-analysis]
if (time_after_eq(jiffies, sd->last_balance + interval)) {
^
/home/himanshu/clang-thread-safety-analysis/include/linux/jiffies.h:112:13: note: expanded from macro 'time_after_eq'
(typecheck(unsigned long, a) && \
^
/home/himanshu/clang-thread-safety-analysis/kernel/sched/fair.c:9483:9: note: mutex acquired here
if (!spin_trylock(&balancing))
^
/home/himanshu/clang-thread-safety-analysis/kernel/sched/fair.c:9500:4: warning: releasing mutex 'balancing' that was not held [-Wthread-safety-analysis]
spin_unlock(&balancing);
^
https://elixir.bootlin.com/linux/v5.2-rc2/source/kernel/sched/fair.c#L9483 Locking/unlocking depends upon
need_serialize
variable.