Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154111
b: refs/heads/master
c: d55d87f
h: refs/heads/master
i:
  154109: cb5717d
  154107: 4fbda57
  154103: 588e54e
  154095: 9c95029
  154079: 236a767
  154047: 8b2685f
  153983: 526025a
  153855: ec13d35
  153599: 031ff73
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 23, 2009
1 parent 02284e4 commit 51a4ebf
Show file tree
Hide file tree
Showing 7 changed files with 6 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: d5fdd6babcfc2b0e6a8da1acf492a69fb54b4c47
refs/heads/master: d55d87fdff8252d0e2f7c28c2d443aee17e9d70f
1 change: 1 addition & 0 deletions trunk/include/net/sctp/sctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
{
struct sctp_ulpevent *event = sctp_skb2event(skb);

skb_orphan(skb);
skb->sk = sk;
skb->destructor = sctp_sock_rfree;
atomic_add(event->rmem_len, &sk->sk_rmem_alloc);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,7 @@ static inline int sk_has_allocations(const struct sock *sk)

static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
{
skb_orphan(skb);
skb->sk = sk;
skb->destructor = sock_wfree;
/*
Expand All @@ -1262,6 +1263,7 @@ static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)

static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
{
skb_orphan(skb);
skb->sk = sk;
skb->destructor = sock_rfree;
atomic_add(skb->truesize, &sk->sk_rmem_alloc);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/ax25/ax25_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype, struct net_device *orig_dev)
{
skb->sk = NULL; /* Initially we don't know who it's for */
skb->destructor = NULL; /* Who initializes this, dammit?! */
skb_orphan(skb);

if (!net_eq(dev_net(dev), &init_net)) {
kfree_skb(skb);
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2310,8 +2310,6 @@ int netif_receive_skb(struct sk_buff *skb)
if (!skb)
goto out;

skb_orphan(skb);

type = skb->protocol;
list_for_each_entry_rcu(ptype,
&ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) {
Expand Down
3 changes: 0 additions & 3 deletions trunk/net/irda/af_irda.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
/* Clean up the original one to keep it in listen state */
irttp_listen(self->tsap);

/* Wow ! What is that ? Jean II */
skb->sk = NULL;
skb->destructor = NULL;
kfree_skb(skb);
sk->sk_ack_backlog--;

Expand Down
1 change: 1 addition & 0 deletions trunk/net/irda/ircomm/ircomm_lmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
/* Don't forget to refcount it - see ircomm_tty_do_softint() */
skb_get(skb);

skb_orphan(skb);
skb->destructor = ircomm_lmp_flow_control;

if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
Expand Down

0 comments on commit 51a4ebf

Please sign in to comment.