The newhook method can be called in ISR context at
certain circumstances, so better use M_NOWAIT in it.
This commit is contained in:
parent
69f3e63a09
commit
ee5fc18d8a
@ -303,8 +303,9 @@ ng_tag_newhook(node_p node, hook_p hook, const char *name)
|
||||
int error;
|
||||
|
||||
/* Create hook private structure. */
|
||||
hip = malloc(sizeof(*hip), M_NETGRAPH_TAG, M_WAITOK | M_ZERO);
|
||||
/* M_WAITOK can't return NULL. */
|
||||
hip = malloc(sizeof(*hip), M_NETGRAPH_TAG, M_NOWAIT | M_ZERO);
|
||||
if (hip == NULL)
|
||||
return (ENOMEM);
|
||||
NG_HOOK_SET_PRIVATE(hook, hip);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user