]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: Fix ks8851 snl NULL pointer dereference Oops
authorTristram Ha <Tristram.Ha@micrel.com>
Thu, 3 Dec 2009 11:06:42 +0000 (11:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Dec 2009 00:04:25 +0000 (16:04 -0800)
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 <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ks8851.c

index a23f739d222f03f553bc9717189995cbb96c7461..6d3ac65bc35cfcd1ae3eb27e6249a8be38efe705 100644 (file)
@@ -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);