convert allocations to INVARIANTS M_ZERO
This commit is contained in:
parent
b17fbe5bf6
commit
fe524329e4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334125
@ -672,7 +672,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK);
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS);
|
||||
inp_list = il->il_inp_list;
|
||||
|
||||
INP_INFO_RLOCK(&V_divcbinfo);
|
||||
|
@ -1056,7 +1056,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK);
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS);
|
||||
inp_list = il->il_inp_list;
|
||||
|
||||
INP_INFO_RLOCK(&V_ripcbinfo);
|
||||
|
@ -2151,7 +2151,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK);
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS);
|
||||
inp_list = il->il_inp_list;
|
||||
|
||||
INP_INFO_WLOCK(&V_tcbinfo);
|
||||
|
@ -874,7 +874,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
|
||||
error = SYSCTL_OUT(req, &xig, sizeof xig);
|
||||
if (error)
|
||||
return (error);
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK);
|
||||
il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS);
|
||||
inp_list = il->il_inp_list;
|
||||
|
||||
INP_INFO_RLOCK(&V_udbinfo);
|
||||
|
@ -64,14 +64,6 @@ int in_epoch(void);
|
||||
DPCPU_DECLARE(int, epoch_cb_count);
|
||||
DPCPU_DECLARE(struct grouptask, epoch_cb_task);
|
||||
|
||||
#ifdef INVARIANTS
|
||||
#define M_EPOCH_CALL_NOWAIT (M_NOWAIT|M_ZERO)
|
||||
#define M_EPOCH_CALL_WAITOK (M_WAITOK|M_ZERO)
|
||||
#else
|
||||
#define M_EPOCH_CALL_NOWAIT M_NOWAIT
|
||||
#define M_EPOCH_CALL_WAITOK M_WAITOK
|
||||
#endif
|
||||
|
||||
static __inline void
|
||||
epoch_enter_preempt(epoch_t epoch)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user