diff options
Diffstat (limited to 'sys/netatm')
-rw-r--r-- | sys/netatm/atm_if.c | 2 | ||||
-rw-r--r-- | sys/netatm/atm_usrreq.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c index 2065312..e5fdb6b 100644 --- a/sys/netatm/atm_if.c +++ b/sys/netatm/atm_if.c @@ -875,7 +875,9 @@ atm_nif_detach(nip) /* * Remove from system interface list (ie. if_detach()) */ + IFNET_WLOCK(); TAILQ_REMOVE(&ifnet, ifp, if_link); + IFNET_WUNLOCK(); /* * Remove from physical interface list diff --git a/sys/netatm/atm_usrreq.c b/sys/netatm/atm_usrreq.c index 4abc66b..e050b6c 100644 --- a/sys/netatm/atm_usrreq.c +++ b/sys/netatm/atm_usrreq.c @@ -394,6 +394,7 @@ atm_dgram_control(so, cmd, data, ifp, td) /* * Make sure prefix name is unique */ + IFNET_RLOCK(); TAILQ_FOREACH(ifp2, &ifnet, if_link) { if (!strcmp(ifp2->if_name, asp->asr_nif_pref)) { /* @@ -407,9 +408,11 @@ atm_dgram_control(so, cmd, data, ifp, td) } if (nip) continue; + IFNET_RUNLOCK(); ATM_RETERR(EEXIST); } } + IFNET_RUNLOCK(); /* * Let interface handle it from here |