Put bandaid for nhgrp_dump_sysctl() malloc KASSERT().
Recent rtsock changes widened epoch and covered nhgrp_dump_sysctl(), resulting in `netstat -4On` triggering with KASSERT. MFC after: 1 day
This commit is contained in:
parent
0f30a36ded
commit
9fa8d1582b
@ -806,7 +806,9 @@ nhgrp_dump_sysctl(struct rib_head *rh, struct sysctl_req *w)
|
||||
sz = sizeof(struct rt_msghdr) + sizeof(struct nhgrp_external);
|
||||
sz += 2 * sizeof(struct nhgrp_container);
|
||||
sz += 2 * sizeof(struct nhgrp_nhop_external) * RIB_MAX_MPATH_WIDTH;
|
||||
buffer = malloc(sz, M_TEMP, M_WAITOK);
|
||||
buffer = malloc(sz, M_TEMP, M_MOWAIT);
|
||||
if (buffer == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
NHOPS_RLOCK(ctl);
|
||||
|
Loading…
Reference in New Issue
Block a user