Bug 59228 - mounting floppy dumps core
mounting floppy dumps core
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
7.1
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-02 20:57 EST by Michal Jaegermann
Modified: 2007-04-18 12:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-11 19:09:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2002-02-02 20:57:14 EST
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
2001
+++ mount-2.11e/util-linux-2.11e/mount/mount_guess_fstype.c	Sat Feb  2 15:31:24
2002
@@ -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-11 19:09:45 EST
 Assigning to util-linux, where mount lives these days.
Comment 2 Elliot Lee 2002-08-02 10:56:39 EDT
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.