mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
p9fs: use M_WAITOK where appropriate
device_attach routines are allowed to sleep, and this routine already
has other M_WAITOK allocations.
Reported by: markj
Reviewed by: markj
Fixes: 1efd69f933b6 ("p9fs: move NULL check immediately after alloc...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45721
This commit is contained in:
parent
81718901e9
commit
3e04ab7f01
1 changed files with 1 additions and 6 deletions
|
|
@ -331,12 +331,7 @@ vt9p_attach(device_t dev)
|
|||
/* Initialize the condition variable */
|
||||
cv_init(&chan->submit_cv, "Conditional variable for submit queue" );
|
||||
chan->max_nsegs = MAX_SUPPORTED_SGS;
|
||||
chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_NOWAIT);
|
||||
if (chan->vt9p_sglist == NULL) {
|
||||
error = ENOMEM;
|
||||
P9_DEBUG(ERROR, "%s: Cannot allocate sglist\n", __func__);
|
||||
goto out;
|
||||
}
|
||||
chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_WAITOK);
|
||||
|
||||
/* Negotiate the features from the host */
|
||||
virtio_set_feature_desc(dev, virtio_9p_feature_desc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue