Bug fix for linux driver

nicroets

Senior Member
Joined
Apr 14, 2004
Messages
821
Reaction score
329
Location
Tbilisi, Georgia
A friend of mine reported kernel panics under Fedora 3? regarding uninitialized spin locks.

After investigating the problem, I created the patch below and he has reported that things are now working.

(The first change is really academic).
Code:
--- ipw-0.2/ipw.c       2005-01-15 15:20:22.000000000 +0200
+++ ipw-0.3/ipw.c       2005-01-15 15:20:22.000000000 +0200
@@ -1030,7 +1030,7 @@
 
        for (minor = 0; minor < IPW_TTY_MINORS && ipw_table[minor]; ++minor)
                ;
-       if (ipw_table[minor]) {
+       if (minor >= IPW_TTY_MINORS) {
                err("No more free IPWireless devices");
                return -ENODEV;
        }
@@ -1049,6 +1049,7 @@
 
        ipw->rx_task.func = ipw_rx_tasklet;
        ipw->rx_task.data = (unsigned long) ipw;
+       spin_lock_init (&ipw->lock);
 
 
        /* record the interface number for the control out */
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X