The following commit has been merged in the master branch:
commit dd58ddc6928f711d8fb7101182215a0f23cf41f1
Author: Linus Lüssing <linus.luessing(a)web.de>
Date: Tue Jan 25 21:56:16 2011 +0000
batman-adv: Fix kernel panic when fetching vis data on a vis server
The hash_iterate removal introduced a bug leading to a kernel panic when
fetching the vis data on a vis server. That commit forgot to rename one
variable name, which this commit fixes now.
Reported-by:…
[View More] Russell Senior <russell(a)personaltelco.net>
Signed-off-by: Linus Lüssing <linus.luessing(a)web.de>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index cd4c423..f69a374 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -268,10 +268,10 @@ int vis_seq_print_text(struct seq_file *seq, void *offset)
buff_pos += sprintf(buff + buff_pos, "%pM,",
entry->addr);
- for (i = 0; i < packet->entries; i++)
+ for (j = 0; j < packet->entries; j++)
buff_pos += vis_data_read_entry(
buff + buff_pos,
- &entries[i],
+ &entries[j],
entry->addr,
entry->primary);
--
LinuxNextTracking
[View Less]
The following commit has been merged in the master branch:
commit 53320fe3bb1b1eef1aaff8dd47aae530ebeeb1e5
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Dec 20 10:32:03 2010 -0800
batman-adv: Return hna count on local buffer fill
hna_local_fill_buffer must return the number of added hna entries and
not the last checked hash bucket.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: David S. Miller <davem(a)davemloft.net&…
[View More]gt;
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index a19e16c..a633b5a4 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -162,7 +162,7 @@ int hna_local_fill_buffer(struct bat_priv *bat_priv,
atomic_set(&bat_priv->hna_local_changed, 0);
spin_unlock_bh(&bat_priv->hna_lhash_lock);
- return i;
+ return count;
}
int hna_local_seq_print_text(struct seq_file *seq, void *offset)
--
LinuxNextTracking
[View Less]
The following commit has been merged in the master branch:
commit ed7809d9c41b514115ddffaa860694393c2016b3
Author: Jesper Juhl <jj(a)chaosbits.net>
Date: Thu Jan 13 21:53:38 2011 +0100
batman-adv: Even Batman should not dereference NULL pointers
There's a problem in net/batman-adv/unicast.c::frag_send_skb().
dev_alloc_skb() allocates memory and may fail, thus returning NULL. If
this happens we'll pass a NULL pointer on to skb_split() which in turn
hands it to …
[View More]skb_split_inside_header() from where it gets passed to
skb_put() that lets skb_tail_pointer() play with it and that function
dereferences it. And thus the bat dies.
While I was at it I also moved the call to dev_alloc_skb() above the
assignment to 'unicast_packet' since there's no reason to do that
assignment if the memory allocation fails.
Signed-off-by: Jesper Juhl <jj(a)chaosbits.net>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index dc2e28b..ee41fef 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -229,10 +229,12 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
if (!bat_priv->primary_if)
goto dropped;
- unicast_packet = (struct unicast_packet *) skb->data;
+ frag_skb = dev_alloc_skb(data_len - (data_len / 2) + ucf_hdr_len);
+ if (!frag_skb)
+ goto dropped;
+ unicast_packet = (struct unicast_packet *) skb->data;
memcpy(&tmp_uc, unicast_packet, uc_hdr_len);
- frag_skb = dev_alloc_skb(data_len - (data_len / 2) + ucf_hdr_len);
skb_split(skb, frag_skb, data_len / 2);
if (my_skb_head_push(skb, ucf_hdr_len - uc_hdr_len) < 0 ||
--
LinuxNextTracking
[View Less]