From 3320eae51d6e4c65b4733bf4d87de3b833973a1f Mon Sep 17 00:00:00 2001 From: Tristram Ha Date: Thu, 3 Dec 2009 11:06:42 +0000 Subject: net: Fix ks8851 snl NULL pointer dereference Oops This fixes the NULL pointer dereference Oops in the ks8851 snl network driver during transmission. All socket buffers from the queue are processed inside the loop, but new workqueues have been scheduled to run. Signed-off-by: Tristram Ha Signed-off-by: David S. Miller --- drivers/net/ks8851.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/ks8851.c') diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index a23f739d222f..6d3ac65bc35c 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c @@ -1,4 +1,4 @@ -/* drivers/net/ks8651.c +/* drivers/net/ks8851.c * * Copyright 2009 Simtec Electronics * http://www.simtec.co.uk/ @@ -714,7 +714,7 @@ static void ks8851_tx_work(struct work_struct *work) { struct ks8851_net *ks = container_of(work, struct ks8851_net, tx_work); struct sk_buff *txb; - bool last = false; + bool last = skb_queue_empty(&ks->txq); mutex_lock(&ks->lock); -- cgit v1.2.3