From owner-svn-src-head@FreeBSD.ORG Thu Oct 30 16:11:07 2008 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 5C007106567C; Thu, 30 Oct 2008 16:11:07 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B1698FC1F; Thu, 30 Oct 2008 16:11:07 +0000 (UTC) (envelope-from dfr@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 m9UGB7Ow055779; Thu, 30 Oct 2008 16:11:07 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGB73w055778; Thu, 30 Oct 2008 16:11:07 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200810301611.m9UGB73w055778@svn.freebsd.org> From: Doug Rabson Date: Thu, 30 Oct 2008 16:11:07 +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: r184477 - head/sys/opencrypto 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: Thu, 30 Oct 2008 16:11:07 -0000 Author: dfr Date: Thu Oct 30 16:11:07 2008 New Revision: 184477 URL: http://svn.freebsd.org/changeset/base/184477 Log: Don't hang if encrypting/decrypting using struct iovecs where one of the iovecs ends on a crypto block boundary. Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Thu Oct 30 16:09:08 2008 (r184476) +++ head/sys/opencrypto/cryptosoft.c Thu Oct 30 16:11:07 2008 (r184477) @@ -352,6 +352,10 @@ swcr_encdec(struct cryptodesc *crd, stru k += blks; i -= blks; } + if (k == iov->iov_len) { + iov++; + k = 0; + } } return 0; /* Done with iovec encryption/decryption */