sgi-xpc: ensure flags are updated before bte_copy
The clearing of the msg->flags needs a barrier between it and the notify of the channel threads that the messages are cleaned and ready for use. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Dean Nelson <dcn@sgi.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
de33c8db59
commit
69b3bb65fa
@@ -1423,7 +1423,7 @@ xpc_send_payload_uv(struct xpc_channel *ch, u32 flags, void *payload,
|
||||
atomic_inc(&ch->n_to_notify);
|
||||
|
||||
msg_slot->key = key;
|
||||
wmb(); /* a non-NULL func must hit memory after the key */
|
||||
smp_wmb(); /* a non-NULL func must hit memory after the key */
|
||||
msg_slot->func = func;
|
||||
|
||||
if (ch->flags & XPC_C_DISCONNECTING) {
|
||||
|
Reference in New Issue
Block a user