From owner-svn-src-head@FreeBSD.ORG Wed May 27 09:52:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE9E310656A9; Wed, 27 May 2009 09:52:12 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC05C8FC19; Wed, 27 May 2009 09:52:12 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4R9qC3u090371; Wed, 27 May 2009 09:52:12 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4R9qCJZ090370; Wed, 27 May 2009 09:52:12 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <200905270952.n4R9qCJZ090370@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Wed, 27 May 2009 09:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192883 - head/sys/crypto/via X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 09:52:13 -0000 Author: vanhu Date: Wed May 27 09:52:12 2009 New Revision: 192883 URL: http://svn.freebsd.org/changeset/base/192883 Log: 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 Modified: head/sys/crypto/via/padlock_hash.c Modified: head/sys/crypto/via/padlock_hash.c ============================================================================== --- head/sys/crypto/via/padlock_hash.c Wed May 27 09:44:14 2009 (r192882) +++ head/sys/crypto/via/padlock_hash.c Wed May 27 09:52:12 2009 (r192883) @@ -171,7 +171,9 @@ padlock_sha_update(struct padlock_sha_ct 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;