From owner-svn-src-all@FreeBSD.ORG Thu Dec 24 15:40:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38018106566B; Thu, 24 Dec 2009 15:40:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 284208FC0A; Thu, 24 Dec 2009 15:40:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBOFe9U8034282; Thu, 24 Dec 2009 15:40:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBOFe9BY034280; Thu, 24 Dec 2009 15:40:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200912241540.nBOFe9BY034280@svn.freebsd.org> From: Marius Strobl Date: Thu, 24 Dec 2009 15:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200947 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 15:40:09 -0000 Author: marius Date: Thu Dec 24 15:40:08 2009 New Revision: 200947 URL: http://svn.freebsd.org/changeset/base/200947 Log: Add missing locking in intr_bind(). Modified: head/sys/sparc64/sparc64/intr_machdep.c Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Thu Dec 24 15:23:51 2009 (r200946) +++ head/sys/sparc64/sparc64/intr_machdep.c Thu Dec 24 15:40:08 2009 (r200947) @@ -450,13 +450,19 @@ int intr_bind(int vec, u_char cpu) { struct intr_vector *iv; + int error; if (vec < 0 || vec >= IV_MAX) return (EINVAL); + sx_xlock(&intr_table_lock); iv = &intr_vectors[vec]; - if (iv == NULL) + if (iv == NULL) { + sx_xunlock(&intr_table_lock); return (EINVAL); - return (intr_event_bind(iv->iv_event, cpu)); + } + error = intr_event_bind(iv->iv_event, cpu); + sx_xunlock(&intr_table_lock); + return (error); } /*