[Bug 220035] [ufs] sys/ufs/ufs/ufs_vnops.c: a sleep-under-mutex bug in acl_alloc
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jun 16 08:19:27 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220035
Bug ID: 220035
Summary: [ufs] sys/ufs/ufs/ufs_vnops.c: a sleep-under-mutex bug
in acl_alloc
Product: Base System
Version: 11.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: baijiaju1990 at 163.com
The ufs program may sleep under a mutex, and the code path in file
"sys/ufs/ufs/ufs_vnops.c" in FreeBSD 11.0 is:
ufs_accessx [line 363: acquire the mutex]
ufs_accessx [line 369]
ufs_accessx [line 372]
ufs_accessx [line 374]
ufs_accessx [line 376]
ufs_accessx [line 379]
ufs_accessx [line 383]
ufs_accessx [line 389]
ufs_accessx [line 394]
ufs_accessx [line 395]
ufs_accessx [line 398]
acl_alloc(M_WAITOK) [line 400] --> may sleep
The possible fix of these bugs is to set the parameter in acl_alloc to
"M_NOWAIT".
This bug is found by a static analysis tool written by myself, and it is
checked by my review of the FreeBSD code.
By the way, I am a freshman in developing FreeBSD drivers, and I am willing to
submit a patch. But I do not know how to write and submit a patch, and where to
submit, so I am looking forward to useful advice :)
Jia-Ju Bai
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list