From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 23:12:19 2015 Return-Path: Delivered-To: svn-src-all@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 A8A6E989; Thu, 2 Apr 2015 23:12:19 +0000 (UTC) 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 94E0E63E; Thu, 2 Apr 2015 23:12:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t32NCJ5Y054425; Thu, 2 Apr 2015 23:12:19 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32NCJmM054423; Thu, 2 Apr 2015 23:12:19 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201504022312.t32NCJmM054423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Thu, 2 Apr 2015 23:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281008 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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, 02 Apr 2015 23:12:19 -0000 Author: peter Date: Thu Apr 2 23:12:18 2015 New Revision: 281008 URL: https://svnweb.freebsd.org/changeset/base/281008 Log: Remove redundant mtx_lock/unlock in ciss_name_device. This is a guaranteed insta-panic on device add/remove. This is only called from the notify thread which already holds the lock while calling this function. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Thu Apr 2 22:42:23 2015 (r281007) +++ head/sys/dev/ciss/ciss.c Thu Apr 2 23:12:18 2015 (r281008) @@ -3438,11 +3438,9 @@ ciss_name_device(struct ciss_softc *sc, target, 0); if (status == CAM_REQ_CMP) { - mtx_lock(&sc->ciss_mtx); xpt_path_lock(path); periph = cam_periph_find(path, NULL); xpt_path_unlock(path); - mtx_unlock(&sc->ciss_mtx); xpt_free_path(path); if (periph != NULL) { sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d",