Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d3e44425e3498eb33f25d94392b4fd0d56a5176
Commit:     9d3e44425e3498eb33f25d94392b4fd0d56a5176
Parent:     0f99be0d115a5716292c58dfdb20d2eddd0f3387
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 8 23:41:28 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jan 8 23:41:28 2008 -0800

    [SOCK]: Adds a rcu_dereference() in sk_filter
    
    It seems commit fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9 introduced a RCU
    protection for sk_filter(), without a rcu_dereference()
    
    Either we need a rcu_dereference(), either a comment should explain why we
    dont need it. I vote for the former.
    
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Acked-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/net/sock.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 67e35c7..6e1542d 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -944,7 +944,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff 
*skb)
                return err;
        
        rcu_read_lock_bh();
-       filter = sk->sk_filter;
+       filter = rcu_dereference(sk->sk_filter);
        if (filter) {
                unsigned int pkt_len = sk_run_filter(skb, filter->insns,
                                filter->len);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to