[Bug 219988] [kernel] sys/kern/kern_sysctl.c:a sleep-under-rmlock bug in sysctl_add_oid
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jun 14 14:30:32 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219988
Bug ID: 219988
Summary: [kernel] sys/kern/kern_sysctl.c:a sleep-under-rmlock
bug in sysctl_add_oid
Product: Base System
Version: 11.0-RELEASE
Hardware: i386
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: baijiaju1990 at 163.com
The kernel may sleep under a rmlock, and the function call path in file
"sys/kern/kern_sysctl.c" in FreeBSD 11.0 is:
sysctl_add_oid [line 706: acquire the rmlock]
malloc(M_WAITOK) [line 722] --> may sleep
The possible fix of this bug is to replace "M_WAITOK" with "M_NOWAIT" in
malloc.
This bug is found by a static analysis tool written by myself, and it is
checked by my review of the FreeBSD code.
Jia-Ju Bai
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list