Add NATM_LOCK() and NATM_UNLOCK() in places where npcb_add() and
npcb_free() are called, in order to eliminate witness panics. This was overlooked in removal of GIANT from ATM. Reviewed by: rwatson
This commit is contained in:
parent
ac445fbab5
commit
eee9fe3078
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148980
@ -144,6 +144,9 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
|
||||
* Parse and verify the link level address as
|
||||
* an open request
|
||||
*/
|
||||
#ifdef NATM
|
||||
NATM_LOCK();
|
||||
#endif
|
||||
bzero(&op, sizeof(op));
|
||||
addr = LLADDR(SDL(gate));
|
||||
alen = SDL(gate)->sdl_alen;
|
||||
@ -247,6 +250,9 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
|
||||
SDL(gate)->sdl_type = rt->rt_ifp->if_type;
|
||||
SDL(gate)->sdl_index = rt->rt_ifp->if_index;
|
||||
|
||||
#ifdef NATM
|
||||
NATM_UNLOCK();
|
||||
#endif
|
||||
break;
|
||||
|
||||
failed:
|
||||
@ -256,6 +262,7 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
|
||||
rt->rt_llinfo = NULL;
|
||||
rt->rt_flags &= ~RTF_LLINFO;
|
||||
}
|
||||
NATM_UNLOCK();
|
||||
#endif
|
||||
/* mark as invalid. We cannot RTM_DELETE the route from
|
||||
* here, because the recursive call to rtrequest1 does
|
||||
@ -269,10 +276,12 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
|
||||
* tell native ATM we are done with this VC
|
||||
*/
|
||||
if (rt->rt_flags & RTF_LLINFO) {
|
||||
NATM_LOCK();
|
||||
npcb_free((struct natmpcb *)rt->rt_llinfo,
|
||||
NPCB_DESTROY);
|
||||
rt->rt_llinfo = NULL;
|
||||
rt->rt_flags &= ~RTF_LLINFO;
|
||||
NATM_UNLOCK();
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user