BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000814 [BusyBox] Other major random 04-05-06 05:29 06-30-06 11:25
Reporter anthony View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.1.x
Summary 0000814: Intermittant error mounting sysfs
Description With Busybox 1.1.1, intermittantly (about 3 in 10 mounts) when the init script I'm working on executes the command:
      mount -t sysfs sysfs /sys
I get the error:
      Couldn't setup loop device
and the mount fails along with the boot.
I didn't get this error with Busybox 1.1.0 from which I have just upgraded (to get the switch_root fix)
Additional Information On looking at the source code, it looks like the error message can only generated if mp->mnt_fsname (in this case sysfs) is a regular file, when in fact it's a dummy argument and doesn't exist at all.

What I believe is happening is that the st structure is uninitialised and in some cases it happens to start off with the st_mode field set to STREG. The lstat fails (because sysfs doesn't exist) and the st structure is not updated leaving the random values from the stack. I notice also that a st_mode=0 which was just before the lstat in 1.1.0 is not there in 1.1.1. I therefore have a trivial patch which adds the st_mode=0 back in, and I haven't seen the problem since.

I will upload the patch in a few minutes
Attached Files  busybox-1.1.1-mount_sysfs-1.patch [^] (488 bytes) 04-05-06 05:39

- Relationships

- Notes
(0001237)
zhuangyy
04-07-06 00:38

the same error also happens in my PPC405ep board while trying to do "mount -t tmpfs -o size=16M tmpfs /tmp". thanks anthony!
 
(0001488)
landley
06-30-06 11:24

svn 14746
 

- Issue History
Date Modified Username Field Change
04-05-06 05:29 anthony New Issue
04-05-06 05:29 anthony Status new => assigned
04-05-06 05:29 anthony Assigned To  => BusyBox
04-05-06 05:39 anthony File Added: busybox-1.1.1-mount_sysfs-1.patch
04-07-06 00:38 zhuangyy Note Added: 0001237
06-30-06 11:24 landley Status assigned => closed
06-30-06 11:24 landley Note Added: 0001488
06-30-06 11:25 landley Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker