Date: Mon, 15 Sep 2014 13:01:47 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271622 - stable/10/sys/kern Message-ID: <201409151301.s8FD1lpB080779@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Mon Sep 15 13:01:47 2014 New Revision: 271622 URL: http://svnweb.freebsd.org/changeset/base/271622 Log: MFC r271317: Avoid unlocking unlocked mutex in RCTL jail code. Specific test case is attached to PR. PR: 193457 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/kern_jail.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Mon Sep 15 12:44:44 2014 (r271621) +++ stable/10/sys/kern/kern_jail.c Mon Sep 15 13:01:47 2014 (r271622) @@ -1811,9 +1811,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409151301.s8FD1lpB080779>