From owner-cvs-all@FreeBSD.ORG Mon Jun 2 16:28:06 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3E8B37B401; Mon, 2 Jun 2003 16:28:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8025A43F3F; Mon, 2 Jun 2003 16:28:06 -0700 (PDT) (envelope-from sam@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h52NS60U002758; Mon, 2 Jun 2003 16:28:06 -0700 (PDT) (envelope-from sam@repoman.freebsd.org) Received: (from sam@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h52NS6Xo002757; Mon, 2 Jun 2003 16:28:06 -0700 (PDT) Message-Id: <200306022328.h52NS6Xo002757@repoman.freebsd.org> From: Sam Leffler Date: Mon, 2 Jun 2003 16:28:06 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/opencrypto crypto.c cryptodev.c cryptodev.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2003 23:28:07 -0000 sam 2003/06/02 16:28:06 PDT FreeBSD src repository Modified files: sys/opencrypto crypto.c cryptodev.c cryptodev.h Log: Flush my local cache of cryto subsystem fixes: o add a ``done'' flag for crypto operations; this is set when the operation completes and is intended for callers to check operations that may complete ``prematurely'' because of direct callbacks o close a race for operations where the crypto driver returns ERESTART: we need to hold the q lock to insure the blocked state for the driver and any driver-private state is consistent; otherwise drivers may take an interrupt and notify the crypto subsystem that it can unblock the driver but operations will be left queued and never be processed o close a race in /dev/crypto where operations can complete before the caller can sleep waiting for the callback: use a per-session mutex and the new done flag to handle this o correct crypto_dispatch's handling of operations where the driver returns ERESTART: the return value must be zero and not ERESTART, otherwise the caller may free the crypto request despite it being queued for later handling (this typically results in a later panic) o change crypto mutex ``names'' so witness printouts and the like are more meaningful Revision Changes Path 1.10 +16 -12 src/sys/opencrypto/crypto.c 1.12 +26 -6 src/sys/opencrypto/cryptodev.c 1.5 +1 -0 src/sys/opencrypto/cryptodev.h