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/lockd/host.c: use of refcount_dec_and_mutex_lock() #155

Open bulwahn opened 4 years ago

bulwahn commented 4 years ago
fs/lockd/host.c:299:3: warning: releasing mutex 'nlm_host_mutex' that was not held [-Wthread-safety-analysis]
                mutex_unlock(&nlm_host_mutex);
                ^
fs/lockd/host.c:301:1: warning: mutex 'nlm_host_mutex' is not held on every path through here [-Wthread-safety-analysis
]
}
^
fs/lockd/host.c:293:6: note: mutex acquired here
        if (refcount_dec_and_mutex_lock(&host->h_count, &nlm_host_mutex)) {
            ^