Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219847
b: refs/heads/master
c: ff75f96
h: refs/heads/master
i:
  219845: 45d9795
  219843: 480c223
  219839: 4ea709f
v: v3
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Sep 14, 2010
1 parent f69762b commit 49aa222
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 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: b001f71ed1ea728814175b711602e150826d13cc
refs/heads/master: ff75f96bb0e9d4fc42efb66a6ccb7bf83ecc298f
8 changes: 6 additions & 2 deletions trunk/drivers/staging/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,12 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct batman_if *recv_if)

orig_node->last_frag_packet = jiffies;

if (list_empty(&orig_node->frag_list))
create_frag_buffer(&orig_node->frag_list);
if (list_empty(&orig_node->frag_list) &&
create_frag_buffer(&orig_node->frag_list)) {
spin_unlock_irqrestore(&bat_priv->orig_hash_lock,
flags);
return NET_RX_DROP;
}

tmp_frag_entry =
search_frag_packet(&orig_node->frag_list,
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/staging/batman-adv/unicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,25 @@ void create_frag_entry(struct list_head *head, struct sk_buff *skb)
return;
}

void create_frag_buffer(struct list_head *head)
int create_frag_buffer(struct list_head *head)
{
int i;
struct frag_packet_list_entry *tfp;

for (i = 0; i < FRAG_BUFFER_SIZE; i++) {
tfp = kmalloc(sizeof(struct frag_packet_list_entry),
GFP_ATOMIC);
if (!tfp) {
frag_list_free(head);
return -ENOMEM;
}
tfp->skb = NULL;
tfp->seqno = 0;
INIT_LIST_HEAD(&tfp->list);
list_add(&tfp->list, head);
}

return;
return 0;
}

struct frag_packet_list_entry *search_frag_packet(struct list_head *head,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/batman-adv/unicast.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct sk_buff *merge_frag_packet(struct list_head *head,
struct sk_buff *skb);

void create_frag_entry(struct list_head *head, struct sk_buff *skb);
void create_frag_buffer(struct list_head *head);
int create_frag_buffer(struct list_head *head);
struct frag_packet_list_entry *search_frag_packet(struct list_head *head,
struct unicast_frag_packet *up);
void frag_list_free(struct list_head *head);
Expand Down

0 comments on commit 49aa222

Please sign in to comment.