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

fs/dcache.c: can't annotate d_delete precisely #128

Open himanshujha199640 opened 5 years ago

himanshujha199640 commented 5 years ago

Similar to: https://github.com/ClangBuiltLinux/thread-safety-analysis/issues/28#issuecomment-496215839 Conditional unlocking.

/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:2391:2: warning: mutex 'inode->i_lock' is not held on every path through here [-Wthread-safety-analysis]
        fsnotify_nameremove(dentry, isdir);
        ^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:2378:2: note: mutex acquired here
        spin_lock(&inode->i_lock);
        ^