Hi,
this fixes
a memory allocation bug,
an SMP deadlock,
synchronous unlink with a spinlock held,
a memory leak without firmware,
freeing urbs without unlinking
It's against 2.4.18-pre7.
Regards
Oliver
--- kaweth.c.alt Sun Feb 3 09:22:52 2002
+++ kaweth.c Sun Feb 3 09:31:54 2002
@@ -238,8 +238,7 @@
return -EBUSY;
}
- dr = kmalloc(sizeof(devrequest),
- in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
+ dr = kmalloc(sizeof(devrequest), GFP_ATOMIC);
if(!dr)
{
@@ -587,14 +586,10 @@
{
struct kaweth_device *kaweth = urb->context;
- spin_lock(&kaweth->device_lock);
-
if (urb->status)
kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
netif_wake_queue(kaweth->net);
-
- spin_unlock(&kaweth->device_lock);
}
/****************************************************************
@@ -722,6 +717,7 @@
kaweth->stats.tx_errors++;
net->trans_start = jiffies;
+ kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
usb_unlink_urb(kaweth->tx_urb);
}
@@ -825,6 +821,7 @@
/* Device will now disappear for a moment... */
kaweth_info("Firmware loaded. I'll be back...");
+ kfree(kaweth);
return NULL;
}
@@ -926,6 +923,9 @@
kaweth_warn("unregistering non-existant device");
return;
}
+
+ usb_unlink_urb(kaweth->rx_urb);
+ usb_unlink_urb(kaweth->tx_urb);
if(kaweth->net) {
if(kaweth->net->flags & IFF_UP) {
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel