dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/crypto
David Howells 65f27f3844 WorkStruct: Pass the work_struct pointer instead of context data
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:55:48 +00:00
..
Kconfig [CRYPTO] api: Select cryptomgr where needed 2006-10-16 21:28:58 +10:00
Makefile [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
aes.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
algapi.c [CRYPTO] api: Add common instance initialisation code 2006-09-21 11:41:04 +10:00
anubis.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
api.c [CRYPTO] api: fix crypto_alloc_base() return value 2006-10-11 22:29:51 +10:00
arc4.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
blkcipher.c [CRYPTO] cipher: Added block cipher type 2006-09-21 11:41:52 +10:00
blowfish.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cast5.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cast6.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cbc.c [CRYPTO] cipher: Added block ciphers for CBC/ECB 2006-09-21 11:44:08 +10:00
cipher.c [CRYPTO] api: Mark parts of cipher interface as deprecated 2006-09-21 11:46:16 +10:00
compress.c [CRYPTO] api: Added cra_init/cra_exit 2006-06-26 17:34:40 +10:00
crc32c.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
crypto_null.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cryptomgr.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
deflate.c [CRYPTO] api: Added cra_init/cra_exit 2006-06-26 17:34:40 +10:00
des.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
digest.c [CRYPTO] digest: Remove old HMAC implementation 2006-09-21 11:46:20 +10:00
ecb.c [CRYPTO] cipher: Added block ciphers for CBC/ECB 2006-09-21 11:44:08 +10:00
hash.c [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
hmac.c [CRYPTO] hmac: Fix error truncation by unlikely() 2006-09-23 16:48:46 -07:00
internal.h [CRYPTO] digest: Remove old HMAC implementation 2006-09-21 11:46:20 +10:00
khazad.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
md4.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
md5.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
michael_mic.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
proc.c [CRYPTO] api: Added crypto_type support 2006-09-21 11:41:51 +10:00
scatterwalk.c [CRYPTO] scatterwalk: Prepare for block ciphers 2006-09-21 11:41:52 +10:00
scatterwalk.h [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
serpent.c [PATCH] serpent: fix endian warnings 2006-10-10 16:15:33 -07:00
sha1.c [CRYPTO] sha: Add module aliases for sha1 / sha256 2006-09-21 11:40:20 +10:00
sha256.c [CRYPTO] sha: Add module aliases for sha1 / sha256 2006-09-21 11:40:20 +10:00
sha512.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
tcrypt.c [CRYPTO] users: Use crypto_comp and crypto_has_* 2006-09-21 11:46:22 +10:00
tcrypt.h [CRYPTO] tcrypt: Use HMAC template and hash interface 2006-09-21 11:46:18 +10:00
tea.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
tgr192.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
twofish.c [CRYPTO] twofish: Fix the priority 2006-09-21 11:16:28 +10:00
twofish_common.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
wp512.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00