Bug 59228 - mounting floppy dumps core
Summary: mounting floppy dumps core
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux   
(Show other bugs)
Version: 7.1
Hardware: alpha
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-03 01:57 UTC by Michal Jaegermann
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-12 00:09:51 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Michal Jaegermann 2002-02-03 01:57:14 UTC
Description of Problem:

Attempts to mount floppy drive when "auto" file system types in
specified bomb out when 'mount-2.11e', as supplied in RH 7.1 for Alpha
and not updated so far, is used.  This seems to be somewhat dependent
on a model of a floppy drive used but it happens.

gdb gives the following backtrace:

(gdb) where
#0  procfsloop (mount_fn=0x120003870 <do_mount_syscall>, args=0x11ffff440, 
    types=0x11ffff568) at mount_guess_fstype.c:398
#1  0x120003b08 in guess_fstype_and_mount (spec=0x120029b30 "/dev/fd0", 
    node=0x120011c4f "no", types=0x11ffff568, flags=6, 
    mount_opts=0x120029bd0 "") at mount.c:501
#2  0x120004988 in try_mount_one (spec0=0x120029ad0 "/dev/fd0", 
    node0=0x120029af0 "/mnt/floppy", types0=0x120029b10 "auto", 
    opts0=0x120029f60 "noauto,owner", freq=0, pass=0, bg=0, ro=0)
    at mount.c:809
#3  0x120005b20 in mount_one (spec=0x120029ad0 "/dev/fd0", 
    node=0x120029af0 "/mnt/floppy", types=0x120029b10 "auto", 
    opts=0x120029f60 "noauto,owner", cmdlineopts=0x0, freq=0, pass=0)
    at mount.c:1128
#4  0x120006cc4 in main (argc=537041616, argv=0x11ffff6f0) at mount.c:1553
#5  0x2000007d0ac in __libc_start_main (main=0x120006410 <main>, argc=2, 
    ubp_av=0x11ffff6e8, init=0x120002b90 <_init>, 
    fini=0x2000002d738 <_dl_debug_mask>, rtld_fini=0, stack_end=0x11ffff6d0)
    at ../sysdeps/generic/libc-start.c:129

Later, not yet released versions, like mount-2.11g have this bug fixed.
In any case the following trivial patch

--- mount-2.11e/util-linux-2.11e/mount/mount_guess_fstype.c~	Thu Jun  7 17:06:54
+++ mount-2.11e/util-linux-2.11e/mount/mount_guess_fstype.c	Sat Feb  2 15:31:24
@@ -395,7 +395,7 @@
 	int errsv = 0;
 	int i;
-	if (!strncmp(*types, "no", 2)) {
+	if (*types && !strncmp(*types, "no", 2)) {
 		no = 1;
 		notypes = (*types) + 2;

solves the problem.

How Reproducible:

With the right floppy mechanism works every time. :-)

Comment 1 Bernhard Rosenkraenzer 2002-02-12 00:09:45 UTC
 Assigning to util-linux, where mount lives these days.

Comment 2 Elliot Lee 2002-08-02 14:56:39 UTC
This is fixed in latest util-linux (and probably many older ones).

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