PATCH: prism2_remove_proc fix (Prism2 Host AP - new release 2002-04-21)


From: Reyk Floeter (reyk_at_synack.de)
Date: 2002-04-22 12:05:15 UTC



On Sun, Apr 21, 2002 at 08:39:23PM +0300, Jouni Malinen wrote:
> A new version of Prism2 Host AP driver was just released and it is now
> available from http://people.ssh.com/jkm/Prism2/
>

Hi!

this version works fine, but there is a null pointer exception after some loads/unloads. i tried the following test script with 2 prism2.5 pci cards and the kernel segfaulted after about 12 cycles:



#!/bin/sh

CARDS="0 1" for i in $(seq 1 100);

        do echo "[($i)]:";
                modprobe hostap_pci;
                for j in $CARDS; do echo "[wlan$j]";
                        ifconfig wlan$j up;
                        iwconfig wlan$j essid WaveHAN$j;
                        ifconfig wlan$j down;
                done;
        modprobe -r hostap_pci;

done

i tried it again with the following patch and it worked without problems (ok, i don't tested more than 100 cycles):



diff -Naur Prism2-2002-04-21/driver/modules/prism2_proc.c Prism2-2002-04-21.procfix/driver/modules/prism2_proc.c
--- Prism2-2002-04-21/driver/modules/prism2_proc.c      Fri Apr 19 18:41:08 2002
+++ Prism2-2002-04-21.procfix/driver/modules/prism2_proc.c      Mon Apr 22 13:51:47 2002
@@ -565,7 +565,7 @@
                remove_proc_entry("stats", local->proc);
                remove_proc_entry("debug", local->proc);
                if (local->dev != NULL && local->dev->name != NULL)
-                       remove_proc_entry(local->dev->name, prism2_proc);
+                       remove_proc_entry(local->dev->name, local->proc);
        }

 }

reyk

-- 
/* -- friendly known free software engineer --
 * reyk_at_hannover.ccc.de https://reyk.synack.de
 */


This archive was generated by hypermail 2.1.4.