From owner-svn-src-head@FreeBSD.ORG Fri Jun 19 18:57:37 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4DF9183; Fri, 19 Jun 2015 18:57:37 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A34578BA; Fri, 19 Jun 2015 18:57:37 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5JIvb9W094204; Fri, 19 Jun 2015 18:57:37 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5JIvbdP094203; Fri, 19 Jun 2015 18:57:37 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506191857.t5JIvbdP094203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 19 Jun 2015 18:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284602 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 18:57:37 -0000 Author: sbruno Date: Fri Jun 19 18:57:36 2015 New Revision: 284602 URL: https://svnweb.freebsd.org/changeset/base/284602 Log: Feedback from commit r284535 davide: imgact_binmisc_clear_entry() needs to use atomic ops to remove the enable bit. kib: M_NOWAIT is not warranted and comment is invalid. Modified: head/sys/kern/imgact_binmisc.c Modified: head/sys/kern/imgact_binmisc.c ============================================================================== --- head/sys/kern/imgact_binmisc.c Fri Jun 19 17:34:59 2015 (r284601) +++ head/sys/kern/imgact_binmisc.c Fri Jun 19 18:57:36 2015 (r284602) @@ -317,7 +317,7 @@ imgact_binmisc_disable_entry(char *name) return (ENOENT); } - ibe->ibe_flags &= ~IBF_ENABLED; + atomic_clear_32(&ibe->ibe_flags, IBF_ENABLED); sx_sunlock(&interp_list_sx); return (0); @@ -406,8 +406,7 @@ imgact_binmisc_get_all_entries(struct sy sx_slock(&interp_list_sx); count = interp_list_entry_count; - /* Don't block in malloc() while holding lock. */ - xbe = malloc(sizeof(*xbe) * count, M_BINMISC, M_NOWAIT|M_ZERO); + xbe = malloc(sizeof(*xbe) * count, M_BINMISC, M_ZERO); if (!xbe) { sx_sunlock(&interp_list_sx); return (ENOMEM);