Bug 194289

Summary: cuse_lib.c use a_cuse after unlocking mutex m_cuse -Wthread-safety-analysis
Product: Base System Reporter: brunolauze
Component: threadsAssignee: freebsd-threads (Nobody) <threads>
Status: Closed FIXED    
Severity: Affects Only Me CC: hselasky, jhb
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
patch-lib__libcuse__cuse_lib.c: mutex unlock correctly. none

Description brunolauze 2014-10-10 17:04:09 UTC
Created attachment 148172 [details]
patch-lib__libcuse__cuse_lib.c: mutex unlock correctly.

lib/libcuse/libcuse.c will throw a compile error with clang 3.6 - trunk - on  -Wthread-safety-analysis . I suggest unlock call being done after the  munmap() call at line 287. Included: the patch
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2014-10-13 07:18:18 UTC
I'll have a look.

--HPS
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-10-13 19:05:55 UTC
A commit references this bug:

Author: hselasky
Date: Mon Oct 13 19:05:19 UTC 2014
New revision: 273059
URL: https://svnweb.freebsd.org/changeset/base/273059

Log:
  Fix compiler locking diagnostic warnings.

  PR:	194289

Changes:
  head/lib/libcuse/cuse_lib.c
Comment 3 Hans Petter Selasky freebsd_committer freebsd_triage 2014-10-13 19:06:35 UTC
Can you verify my patch fixes the problem?

--HPS