On Wed, 2007-10-31 at 14:39 -0700, Daniel Wu wrote:
> > >
> > > The /proc/sys/dev/ath/debug and others are fine.
> >
> > Just yesterday, I committed a fix for sysctl for Linux 2.6.24-rc1.  Are
> > you running Linux 2.6.24-rc1 by any chance?  Perhaps my sysctl patches
> > should be propagated to other branches.
> 
> I'm running:
> [EMAIL PROTECTED] madwifi-trace]# uname -a
> Linux exp0 2.6.20-1.2952.fc6 #1 SMP Wed May 16 18:59:18 EDT 2007 i686
> i686 i386 GNU/Linux

Then it's something different.  Sorry for the noise.

> > Please see dmesg output for sysctl problems.
> >
> Any specific line I'm looking for?
> 
> alq_open: no memory for alq entbuf
> ath_hal: logging to /tmp/ath_hal.log could not be setup

That's the real problem.  So, we know that sysctl_hw_ath_hal_log() is
called, which means sysctl tables are OK, proc_dointvec() is OK,
ath_hal_setlogging() is called, and then alq_open() fails to allocate
count*size bytes, which is initially 64*8*1024=512k.

Wow, that quite a lot for kmalloc(), isn't it?  Would not vmalloc() work
better?  Please try this patch.  Sorry, compile tested only.

Index: ath_hal/kern_alq.c
===================================================================
--- ath_hal/kern_alq.c  (revision 2815)
+++ ath_hal/kern_alq.c  (working copy)
@@ -34,6 +34,7 @@
 #include <linux/uio.h>
 #include <linux/wait.h>
 #include <linux/sched.h>
+#include <linux/vmalloc.h>
 
 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
@@ -333,7 +334,7 @@
                goto bad1;
        }
        memset(alq, 0, sizeof(*alq));
-       alq->aq_entbuf = kmalloc(count * size, GFP_KERNEL);
+       alq->aq_entbuf = vmalloc(count * size);
        if (alq->aq_entbuf == NULL) {
                printk("%s: no memory for alq entbuf\n", __func__);
                error = -ENOMEM;
@@ -384,7 +385,7 @@
 bad4:
        kfree(alq->aq_first);
 bad3:
-       kfree(alq->aq_entbuf);
+       vfree(alq->aq_entbuf);
 bad2:
        kfree(alq);
 bad1:
@@ -521,7 +522,7 @@
        /* XXX drop module refcnt */
 
        kfree(alq->aq_first);
-       kfree(alq->aq_entbuf);
+       vfree(alq->aq_entbuf);
        kfree(alq);
 }
 EXPORT_SYMBOL(alq_close);


-- 
Regards,
Pavel Roskin

_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to