Bug 194289 - cuse_lib.c use a_cuse after unlocking mutex m_cuse -Wthread-safety-analysis
Summary: cuse_lib.c use a_cuse after unlocking mutex m_cuse -Wthread-safety-analysis
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: threads (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-threads (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-10 17:04 UTC by brunolauze
Modified: 2014-11-13 15:03 UTC (History)
2 users (show)

See Also:


Attachments
patch-lib__libcuse__cuse_lib.c: mutex unlock correctly. (407 bytes, text/plain)
2014-10-10 17:04 UTC, brunolauze
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 2014-10-13 07:18:18 UTC
I'll have a look.

--HPS
Comment 2 commit-hook freebsd_committer 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 2014-10-13 19:06:35 UTC
Can you verify my patch fixes the problem?

--HPS