Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2011 22:09:14 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227591 - head/sys/dev/re
Message-ID:  <201111162209.pAGM9E59068828@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111162209.pAGM9E59068828>