From owner-svn-src-all@FreeBSD.ORG Mon Jun 15 13:48:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982361065675; Mon, 15 Jun 2009 13:48:31 +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 84D7F8FC15; Mon, 15 Jun 2009 13:48:31 +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 n5FDmVUC091396; Mon, 15 Jun 2009 13:48:31 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FDmVda091395; Mon, 15 Jun 2009 13:48:31 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <200906151348.n5FDmVda091395@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Mon, 15 Jun 2009 13:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194238 - in stable/7/sys: . contrib/pf crypto/via dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 13:48:32 -0000 Author: vanhu Date: Mon Jun 15 13:48:31 2009 New Revision: 194238 URL: http://svn.freebsd.org/changeset/base/194238 Log: MFC: Changed to M_NOWAIT when reallocing psc_buf in padlock_sha_update(), as we already hold the non sleepable crypto_driver_mutex. Obtained from: NETASQ Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/crypto/via/padlock_hash.c stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/crypto/via/padlock_hash.c ============================================================================== --- stable/7/sys/crypto/via/padlock_hash.c Mon Jun 15 13:47:49 2009 (r194237) +++ stable/7/sys/crypto/via/padlock_hash.c Mon Jun 15 13:48:31 2009 (r194238) @@ -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;