Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-5] src/sys



Module Name:    src
Committed By:   snj
Date:           Thu Nov 20 03:22:38 UTC 2008

Modified Files:
        src/sys/opencrypto [netbsd-5]: crypto.c cryptodev.c cryptodev.h
        src/sys/sys [netbsd-5]: queue.h

Log Message:
Pull up following revision(s) (requested by darran in ticket #92):
        sys/opencrypto/cryptodev.c: revision 1.45
        sys/sys/queue.h: revision 1.50
        sys/opencrypto/cryptodev.h: revision 1.15
        sys/opencrypto/crypto.c: revision 1.30
Fix a race condition in opencrypto where the crypto request could be
completed by the crypto device, queued on the retq, but freed by the
ioctl lwp.  The problem manifests as various panics relating to the
condvar inside the request. The problem can occur whenever the crypto
device completes the request immediately and the ioctl skips the
cv_wait().
The problem can be reproduced by enabling cryptosoft and running an
openssl
speed test. E.g.
    sysctl -w kern.cryptodevallowsoft=-1
    openssl speed -engine cryptodev -evp des-ede3-cbc -multi 64
Add a macro for TAILQ_FOREACH_REVERSE_SAFE() to queue.h, since this
was missing and the opencrypto code removes requests from a list while
iterating with TAILQ_FOREACH_REVERSE().
Add missing cv_destroy() calls for the key request cleanup.
Reviewed by Thor Lancelot Simon.


To generate a diff of this commit:
cvs rdiff -r1.29 -r1.29.4.1 src/sys/opencrypto/crypto.c
cvs rdiff -r1.44 -r1.44.8.1 src/sys/opencrypto/cryptodev.c
cvs rdiff -r1.14 -r1.14.10.1 src/sys/opencrypto/cryptodev.h
cvs rdiff -r1.49 -r1.49.6.1 src/sys/sys/queue.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index