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

ipc/util.c: conditional unlocking in ipc_addid #75

Open himanshujha199640 opened 5 years ago

himanshujha199640 commented 5 years ago

https://elixir.bootlin.com/linux/v5.2-rc2/source/ipc/util.c#L277

/home/himanshu/clang-thread-safety-analysis/ipc/util.c:326:1: warning: mutex '->lock' is not held on every path through here [-Wthread-safety-analysis]
}
^
/home/himanshu/clang-thread-safety-analysis/ipc/util.c:296:2: note: mutex acquired here
        spin_lock(&new->lock);
        ^