kernel-ark/net
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
..
802
8021q [PATCH] Finish annotations of struct vlan_ethhdr 2006-10-10 16:15:34 -07:00
appletalk [APPLETALK]: Fix potential OOPS in atalk_sendmsg(). 2006-10-30 15:24:34 -08:00
atm [ATM]: handle sysfs errors 2006-10-21 19:55:22 -07:00
ax25
bluetooth [BLUETOOTH]: Fix unaligned access in hci_send_to_sock. 2006-11-21 16:17:41 -08:00
bridge [NETFILTER]: silence a warning in ebtables 2006-11-01 18:07:27 -08:00
core WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
dccp [IPV6]: Fix address/interface handling in UDP and DCCP, according to the scoping architecture. 2006-11-21 17:41:56 -08:00
decnet [DECNET]: Endianess fixes (try #2) 2006-11-07 15:10:17 -08:00
econet
ethernet
ieee80211 [PATCH] ieee80211: don't flood log with errors 2006-10-31 22:15:38 -05:00
ipv4 WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
ipv6 [IPV6]: Fix address/interface handling in UDP and DCCP, according to the scoping architecture. 2006-11-21 17:41:56 -08:00
ipx [IPX]: Annotate and fix IPX checksum 2006-11-05 14:11:25 -08:00
irda [IRDA]: Lockdep fix. 2006-11-21 17:33:01 -08:00
key IPsec: correct semantics for SELinux policy matching 2006-10-11 23:59:37 -07:00
lapb
llc
netfilter [NETFILTER]: Use pskb_trim in {ip,ip6,nfnetlink}_queue 2006-11-15 21:18:48 -08:00
netlabel [NETLABEL]: Fix build failure. 2006-11-05 16:44:06 -08:00
netlink [NET]: fix uaccess handling 2006-10-30 15:24:41 -08:00
netrom
packet
rose
rxrpc
sched [PKT_SCHED] sch_htb: Use hlist_del_init(). 2006-11-07 15:10:12 -08:00
sctp [SCTP]: Remove temporary associations from backlog and hash. 2006-10-30 18:55:11 -08:00
sunrpc WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
tipc [TIPC] net/tipc/port.c: fix NULL dereference 2006-11-01 15:42:33 -08:00
unix
wanrouter
x25
xfrm [XFRM]: nlmsg length not computed correctly in the presence of subpolicies 2006-11-21 16:16:35 -08:00
compat.c [NET]: File descriptor loss while receiving SCM_RIGHTS 2006-10-11 23:59:48 -07:00
Kconfig [NETLABEL]: Fix build failure. 2006-11-05 16:44:06 -08:00
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE