mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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.
(cherry picked from commit 9fa8d1582b)
This commit is contained in:
parent
923e7f7e12
commit
145ca12d22
1 changed files with 3 additions and 1 deletions
|
|
@ -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_NOWAIT);
|
||||
if (buffer == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
NHOPS_RLOCK(ctl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue