From owner-svn-src-head@FreeBSD.ORG Wed Nov 16 22:09:15 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27806106564A; Wed, 16 Nov 2011 22:09:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 174528FC0C; Wed, 16 Nov 2011 22:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAGM9Ekq068830; Wed, 16 Nov 2011 22:09:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAGM9E59068828; Wed, 16 Nov 2011 22:09:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201111162209.pAGM9E59068828@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 16 Nov 2011 22:09:14 +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: r227591 - head/sys/dev/re X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 16 Nov 2011 22:09:15 -0000 Author: yongari Date: Wed Nov 16 22:09:14 2011 New Revision: 227591 URL: http://svn.freebsd.org/changeset/base/227591 Log: Add missing driver lock in SIOCSIFCAP handler. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Wed Nov 16 22:05:38 2011 (r227590) +++ head/sys/dev/re/if_re.c Wed Nov 16 22:09:14 2011 (r227591) @@ -3312,6 +3312,7 @@ re_ioctl(struct ifnet *ifp, u_long comma } } #endif /* DEVICE_POLLING */ + RL_LOCK(sc); if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { ifp->if_capenable ^= IFCAP_TXCSUM; @@ -3370,8 +3371,9 @@ re_ioctl(struct ifnet *ifp, u_long comma } if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - re_init(sc); + re_init_locked(sc); } + RL_UNLOCK(sc); VLAN_CAPABILITIES(ifp); } break;