mirror of
https://github.com/opnsense/src.git
synced 2026-02-04 03:00:53 -06: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
b7f98eec8d
commit
48dc58f307
@ -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…
x
Reference in New Issue
Block a user