svn commit: r271317 - head/sys/kern
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Sep 9 16:05:33 UTC 2014
Author: trasz
Date: Tue Sep 9 16:05:33 2014
New Revision: 271317
URL: http://svnweb.freebsd.org/changeset/base/271317
Log:
Avoid unlocking unlocked mutex in RCTL jail code. Specific test case
is attached to PR.
PR: 193457
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/kern/kern_jail.c
Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c Tue Sep 9 15:19:38 2014 (r271316)
+++ head/sys/kern/kern_jail.c Tue Sep 9 16:05:33 2014 (r271317)
@@ -1812,9 +1812,11 @@ kern_jail_set(struct thread *td, struct
#ifdef RACCT
if (!created) {
- sx_sunlock(&allprison_lock);
+ if (!(flags & JAIL_ATTACH))
+ sx_sunlock(&allprison_lock);
prison_racct_modify(pr);
- sx_slock(&allprison_lock);
+ if (!(flags & JAIL_ATTACH))
+ sx_slock(&allprison_lock);
}
#endif
More information about the svn-src-all
mailing list