aboutsummaryrefslogtreecommitdiff
path: root/firmware/dsp56k
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-07-15 23:13:10 +0000
committerDavid S. Miller <davem@davemloft.net>2009-07-16 18:05:26 -0700
commit4dc6dc7162c08b9965163c9ab3f9375d4adff2c7 (patch)
treef4b9959e9ca5e5b8bdb6301663a15e0f67d4c68c /firmware/dsp56k
parent303d67c288319768b19ed8dbed429fef7eb7c275 (diff)
net: sock_copy() fixes
Commit e912b1142be8f1e2c71c71001dc992c6e5eb2ec1 (net: sk_prot_alloc() should not blindly overwrite memory) took care of not zeroing whole new socket at allocation time. sock_copy() is another spot where we should be very careful. We should not set refcnt to a non null value, until we are sure other fields are correctly setup, or a lockless reader could catch this socket by mistake, while not fully (re)initialized. This patch puts sk_node & sk_refcnt to the very beginning of struct sock to ease sock_copy() & sk_prot_alloc() job. We add appropriate smp_wmb() before sk_refcnt initializations to match our RCU requirements (changes to sock keys should be committed to memory before sk_refcnt setting) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'firmware/dsp56k')
0 files changed, 0 insertions, 0 deletions