Re: [2.6.27.2] Unnamed entry appears in/sys/module/usbcore/parameters/ .

From: Tetsuo Handa
Date: Thu Oct 23 2008 - 07:15:01 EST


Hello.

I tested 2.6.27.3 on Debian Sarge. I got the same result.

So, I tried to produce different results.

I pruned declaration of module_param(usbfs_snoop) like

static int usbfs_snoop;
/*
module_param(usbfs_snoop, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(usbfs_snoop, "true to log all usbfs traffic");
*/

and I got the below result.

# ls -ail /sys/module/usbcore/parameters/
total 0
189 drwxr-xr-x 2 root root 0 Oct 24 2008
189 drwxr-xr-x 2 root root 0 Oct 24 2008 .
188 drwxr-xr-x 4 root root 0 Oct 24 2008 ..
190 -rw-r--r-- 1 root root 4096 Oct 24 2008 autosuspend
192 -r--r--r-- 1 root root 4096 Oct 24 2008 blinkenlights
193 -rw-r--r-- 1 root root 4096 Oct 24 2008 old_scheme_first

This time, 'use_both_schemes' entry became no-name.

I added declaration of module_param(usbfs_aaaaa) and module_param(usbfs_zzzzz)
like

static int usbfs_aaaaa;
module_param(usbfs_aaaaa, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(usbfs_aaaaa, "true to log all usbfs traffic");

static int usbfs_snoop;
module_param(usbfs_snoop, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(usbfs_snoop, "true to log all usbfs traffic");

static int usbfs_zzzzz;
module_param(usbfs_zzzzz, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(usbfs_zzzzz, "true to log all usbfs traffic");

and I got the below result.

# ls -ail /sys/module/usbcore/parameters/
total 0
189 drwxr-xr-x 2 root root 0 Oct 24 2008
189 drwxr-xr-x 2 root root 0 Oct 24 2008 .
188 drwxr-xr-x 4 root root 0 Oct 24 2008 ..
190 -rw-r--r-- 1 root root 4096 Oct 24 2008 autosuspend
192 -r--r--r-- 1 root root 4096 Oct 24 2008 blinkenlights
193 -rw-r--r-- 1 root root 4096 Oct 24 2008 old_scheme_first
195 -rw-r--r-- 1 root root 4096 Oct 24 2008 usbfs_aaaaa
196 -rw-r--r-- 1 root root 4096 Oct 24 2008 usbfs_snoop
194 -rw-r--r-- 1 root root 4096 Oct 24 2008 use_both_schemes

This time, 'usbfs_zzzzz' entry became no-name.

Greg KH wrote:
> I really have no idea what is causing this, and can't seem to duplicate
> this here at all.
It seems to me that somebody is overwriting (or truncating) at address
of module_param(usbfs_snoop) .

Is there a way to change the address of module_param() defined by
usbcore module?

Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/