don't allocate AES keys with M_WAITOK!

This commit is contained in:
tls 2008-02-01 19:10:31 +00:00
parent f27a14abed
commit 8edf0049e7
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cryptosoft_xform.c,v 1.5 2007/03/04 06:03:40 christos Exp $ */
/* $NetBSD: cryptosoft_xform.c,v 1.6 2008/02/01 19:10:31 tls Exp $ */
/* $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */
/* $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $ */
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.5 2007/03/04 06:03:40 christos Exp $");
__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.6 2008/02/01 19:10:31 tls Exp $");
#include <crypto/blowfish/blowfish.h>
#include <crypto/cast128/cast128.h>
@ -537,7 +537,7 @@ rijndael128_setkey(u_int8_t **sched, const u_int8_t *key, int len)
int err;
MALLOC(*sched, u_int8_t *, sizeof(rijndael_ctx), M_CRYPTO_DATA,
M_WAITOK);
M_NOWAIT);
if (*sched != NULL) {
bzero(*sched, sizeof(rijndael_ctx));
rijndael_set_key((rijndael_ctx *) *sched, key, len * 8);