Changed to M_NOWAIT when reallocing psc_buf in padlock_sha_update(),

as we already hold the non sleepable crypto_driver_mutex.

Approved by:	gnn(mentor)
Obtained from:	NETASQ
MFC after:	2 weeks
This commit is contained in:
VANHULLEBUS Yvan 2009-05-27 09:52:12 +00:00
parent aa1faa5fc6
commit 081b9301bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192883

View File

@ -171,7 +171,9 @@ padlock_sha_update(struct padlock_sha_ctx *ctx, uint8_t *buf, uint16_t bufsize)
if (ctx->psc_size - ctx->psc_offset < bufsize) {
ctx->psc_size = MAX(ctx->psc_size * 2, ctx->psc_size + bufsize);
ctx->psc_buf = realloc(ctx->psc_buf, ctx->psc_size, M_PADLOCK,
M_WAITOK);
M_NOWAIT);
if(ctx->psc_buf == NULL)
return (ENOMEM);
}
bcopy(buf, ctx->psc_buf + ctx->psc_offset, bufsize);
ctx->psc_offset += bufsize;