Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236549
b: refs/heads/master
c: 80f8f10
h: refs/heads/master
i:
  236547: 98d09db
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 19, 2011
1 parent b64c59d commit dd664ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6ae3bae3d1bf7a8bf367e29f2cac0788dcd0db5
refs/heads/master: 80f8f1027b99660897bdeaeae73002185d829906
2 changes: 1 addition & 1 deletion trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ extern void sk_filter_release_rcu(struct rcu_head *rcu);
static inline void sk_filter_release(struct sk_filter *fp)
{
if (atomic_dec_and_test(&fp->refcnt))
call_rcu_bh(&fp->rcu, sk_filter_release_rcu);
call_rcu(&fp->rcu, sk_filter_release_rcu);
}

static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp)
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ int sk_filter(struct sock *sk, struct sk_buff *skb)
if (err)
return err;

rcu_read_lock_bh();
filter = rcu_dereference_bh(sk->sk_filter);
rcu_read_lock();
filter = rcu_dereference(sk->sk_filter);
if (filter) {
unsigned int pkt_len = sk_run_filter(skb, filter->insns);

err = pkt_len ? pskb_trim(skb, pkt_len) : -EPERM;
}
rcu_read_unlock_bh();
rcu_read_unlock();

return err;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,11 @@ static inline unsigned int run_filter(const struct sk_buff *skb,
{
struct sk_filter *filter;

rcu_read_lock_bh();
filter = rcu_dereference_bh(sk->sk_filter);
rcu_read_lock();
filter = rcu_dereference(sk->sk_filter);
if (filter != NULL)
res = sk_run_filter(skb, filter->insns);
rcu_read_unlock_bh();
rcu_read_unlock();

return res;
}
Expand Down

0 comments on commit dd664ff

Please sign in to comment.