Hello, there was a small bug in L4Linux's L4shm based network driver, which broke the driver on architectures where NET_IP_ALIGN != 0, e.g. on ARM. This resulted in insufficient data being allocated for the skb in l4x_l4shmc_interrupt, causing the subsequent skb_put to fail.
See attached diff for details. Cheers, Matthias
diff --git a/drivers/net/l4shmnet.c b/drivers/net/l4shmnet.c
index b0f816c..602080f 100644
--- a/drivers/net/l4shmnet.c
+++ b/drivers/net/l4shmnet.c
@@ -28,7 +28,7 @@ static int shmsize = 1 << 20;
static char devs_create[NR_OF_DEVS];
static char devs_to_add_name[NR_OF_DEVS][20];
static char devs_to_add_macpart[NR_OF_DEVS];
-static int devs_to_add_pos;
+static int devs_to_add_pos = 0;
static LIST_HEAD(l4x_l4shmnet_netdevices);
@@ -169,7 +169,8 @@ static irqreturn_t l4x_l4shmc_interrupt(int irq, void
*dev_id)
if (!rph->size)
break;
- skb = dev_alloc_skb(rph->size);
+ /* NET_IP_ALIGN is non-zero on some architectures */
+ skb = dev_alloc_skb(rph->size + NET_IP_ALIGN);
if (unlikely(!skb)) {
printk(KERN_WARNING "%s: dropping packet (%ld).\n",
signature.asc
Description: OpenPGP digital signature
_______________________________________________ l4-hackers mailing list [email protected] http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
