From owner-svn-src-all@freebsd.org Tue Jul 25 14:41:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 603EEC7DD6C; Tue, 25 Jul 2017 14:41:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C8C857DE76; Tue, 25 Jul 2017 14:41:51 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6PEfogn030335; Tue, 25 Jul 2017 14:41:50 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6PEfocM030334; Tue, 25 Jul 2017 14:41:50 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707251441.v6PEfocM030334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 25 Jul 2017 14:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321477 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 321477 X-SVN-Commit-Repository: base 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.23 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: Tue, 25 Jul 2017 14:41:52 -0000 Author: sbruno Date: Tue Jul 25 14:41:50 2017 New Revision: 321477 URL: https://svnweb.freebsd.org/changeset/base/321477 Log: Don't hold the RM lock during lagg_proto_addport() to avoid an LOR. Submitted by: Kevin Bowling Reviewed by: mav MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11711 Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue Jul 25 14:38:30 2017 (r321476) +++ head/sys/net/if_lagg.c Tue Jul 25 14:41:50 2017 (r321477) @@ -738,14 +738,15 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet * lagg_setmulti(lp); + LAGG_WUNLOCK(sc); + if ((error = lagg_proto_addport(sc, lp)) != 0) { /* Remove the port, without calling pr_delport. */ + LAGG_WLOCK(sc); lagg_port_destroy(lp, 0); LAGG_UNLOCK_ASSERT(sc); return (error); } - - LAGG_WUNLOCK(sc); /* Update lagg capabilities */ lagg_capabilities(sc);