diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2015-09-15 16:14:16 -0500 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2015-10-20 12:06:44 -0500 |
commit | 4a5da8d970cd2aa5659b6ef40220a69671465f74 (patch) | |
tree | 3f81b076d3df7632bb50f427f8cdf77764e60763 /sys/opencrypto/cryptosoft.c | |
parent | c34073cc8f92a0177aa3411a36197df65f68b0c0 (diff) | |
download | FreeBSD-src-4a5da8d970cd2aa5659b6ef40220a69671465f74.zip FreeBSD-src-4a5da8d970cd2aa5659b6ef40220a69671465f74.tar.gz |
MFC r285247:
we may get here w/ non-sleepable locks held, so switch to _NOWAIT when
doing this memory allocation...
Reviewed by: ae
TAG: IPSEC-HEAD
Issue: #4841
Diffstat (limited to 'sys/opencrypto/cryptosoft.c')
-rw-r--r-- | sys/opencrypto/cryptosoft.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index d769eea..77ab507 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -147,8 +147,10 @@ swcr_encdec(struct cryptodesc *crd, struct swcr_data *sw, caddr_t buf, iovalloc = 0; uio = &uiolcl; if ((flags & CRYPTO_F_IMBUF) != 0) { - crypto_mbuftoiov((struct mbuf *)buf, &iov, &iovcnt, + error = crypto_mbuftoiov((struct mbuf *)buf, &iov, &iovcnt, &iovalloc); + if (error) + return (error); uio->uio_iov = iov; uio->uio_iovcnt = iovcnt; } else if ((flags & CRYPTO_F_IOV) != 0) |