Bug 404251 - Directory /sys/module/nousb/parameters has entry with zero-length name
Summary: Directory /sys/module/nousb/parameters has entry with zero-length name
Keywords:
Status: CLOSED DUPLICATE of bug 367351
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 8
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-29 11:17 UTC by Dmitry Antipov
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-29 14:48:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dmitry Antipov 2007-11-29 11:17:11 UTC
Being sure that sysfs is mounted, go to /sys/module/nousb/parameters and run the
following program from it:

#include <stdio.h>
#include <string.h>
#include <dirent.h>

int main (int argc, char *argv[])
{
  DIR *d;
  struct dirent *dp;

  d = opendir (".");
  while ((dp = readdir (d)))
    printf ("'%s' %d\n", dp->d_name, strlen (dp->d_name));
  closedir (d);
  
  return 0;
}

The output is:

'.' 1
'..' 2
'' 0

The output of 'ls -lai' is:

ls: cannot access : No such file or directory
total 0
164 -????????? ? ?    ?    ?            ? 
163 drwxr-xr-x 2 root root 0 Nov 28 21:10 .
162 drwxr-xr-x 3 root root 0 Nov 28 21:10 ..

It looks like  /sys/module/nousb/parameters  contains invalid inode, which is
probably a bug somewhere in sysfs.

It was observed by running updatedb with default /etc/updatedb.conf - if /sys is
not in PRUNEPATHS, updatedb aborts with the message

updatedb: src/updatedb.c:730: scan_cwd: Assertion `name_size > 1' failed.

Comment 1 Chuck Ebbert 2007-11-29 14:48:11 UTC

*** This bug has been marked as a duplicate of 367351 ***


Note You need to log in before you can comment on or make changes to this bug.