Bug 404251

Summary: Directory /sys/module/nousb/parameters has entry with zero-length name
Product: [Fedora] Fedora Reporter: Dmitry Antipov <dmantipov>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-29 14:48:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 ***