Bug 220756 - Kernel crashes when mounting reiserfs FS from /etc/fstab; mounts the same partition from command line without problem
Kernel crashes when mounting reiserfs FS from /etc/fstab; mounts the same par...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
6
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
: 211561 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-25 17:10 EST by Dieter Bürßner
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version: 2.6.20-1.2945.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-23 17:08:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dmesg, that shows output about kernel bug (23.28 KB, text/plain)
2006-12-25 17:10 EST, Dieter Bürßner
no flags Details

  None (edit)
Description Dieter Bürßner 2006-12-25 17:10:00 EST
Description of problem:
FC6 crashes while booting, when mounting a reiserfs FS. dmesg, that shows the
"Kernel Bug" is attached. At the moment, /etc/fstab looks like this:

/dev/sda11              /                       ext3    defaults        1 1
/dev/sda10              /boot                   ext2    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
/dev/sda12              /mnt/12                 ext2    defaults        1 2
/dev/sda13              /mnt/13                 ext3    defaults        1 2
/dev/sda14              /mnt/14                 vfat    defaults        0 0
/dev/sda15              /mnt/15                 vfat    defaults        0 0
/dev/sda3               /mnt/3                  vfat    defaults        0 0
/dev/sda4               /mnt/4                  vfat    defaults        0 0
/dev/sda6               /mnt/6                  ext2    defaults        1 2
/dev/sda8               /mnt/8                  ext2    defaults        1 2
/dev/sda9               /mnt/9                  ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
/dev/sda5               swap                    swap    defaults        0 0
#/dev/sda7               /mnt/7                  reiserfs defaults        1 2

Uncommenting the last line will give a crash, during the boot process. Having
that line at several other places, will yield in a crash, too. Having less
mounted file systems did not change this. 

With the last line commented, and at the prompt
$mount /dev/sda7 /mnt/7
there was no crash. Other Linux distributions (opensuse, ubuntu) can mount that
file system without any problems. For information, here is the output of fdisk -l;
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       19123   153605466    7  HPFS/NTFS
/dev/sda2           20907       38913   144641227+   f  W95 Ext'd (LBA)
/dev/sda3           19124       20397    10233405    c  W95 FAT32 (LBA)
/dev/sda4           20398       20906     4088542+   c  W95 FAT32 (LBA)
/dev/sda5           20907       21416     4096543+  82  Linux swap / Solaris
/dev/sda6           21417       21543     1020096   83  Linux
/dev/sda7           21544       24731    25607578+  83  Linux
/dev/sda8           24732       24859     1028128+  83  Linux
/dev/sda9           24860       28684    30724281   83  Linux
/dev/sda10          28685       28812     1028128+  83  Linux
/dev/sda11          28813       32637    30724281   83  Linux
/dev/sda12          32638       32765     1028128+  83  Linux
/dev/sda13          32766       35953    25607578+  83  Linux
/dev/sda14          35954       37607    13285723+   b  W95 FAT32
/dev/sda15          37608       38913    10490413+   b  W95 FAT32

Version-Release number of selected component (if applicable):
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-1.2868.fc6 #1 SMP Fri Dec 15 17:29:48 EST
2006 x86_64 x86_64 x86_64 GNU/Linux
How reproducible:
On my system, this is always reproducable.  Random changes to /etc/fstab had
shown, whenever you mount the reiserfs FS from /etc/fstab, FC6 will crash.

Steps to Reproduce:
Well, good luck
1. Create disk layout, like above
2. Create /etc/fstab like above
3. Boot
  
Actual results:


Expected results:


Additional info:
Comment 1 Dieter Bürßner 2006-12-25 17:10:01 EST
Created attachment 144356 [details]
dmesg, that shows output about kernel bug
Comment 2 Eric Sandeen 2007-04-23 12:47:35 EDT
Looks like 2 things went on here:

audit(1167082986.322:4): avc:  denied  { search } for  pid=1901 comm="mount"
name="/" dev=sda7 ino=2 scontext=system_u:system_r:mount_t:s0
tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir
ReiserFS: sda7: warning: xattrs/ACLs enabled and couldn't find/create
.reiserfs_priv. Failing mount.
Adding 4096532k swap on /dev/sda5.  Priority:-1 extents:1 across:4096532k
list_add corruption. prev->next should be ffffffff8055c200, but was 0000000000000000

so you got an avc, but then reiser didn't cope (?) and a list got corrupted.

Does the problem still exist on the latest FC6 kernel?
Comment 3 Eric Sandeen 2007-04-23 17:08:41 EDT
I haven't taken the time to track down what exactly fixed this, but something
upstream did.  On 2.6.18-1.2868.fc6 I hit the failure exactly as you did, on
2.6.20-1.2945.fc6 it works fine.  (2.6.20-1.2945.fc6 may not be available yet,
it's the latest internal kernel, but I assume 2.6.20-* has this fixed)
Comment 4 Eric Sandeen 2007-04-23 17:24:05 EDT
Hmm I should clarify a bit; with a recent kernel the mount does not crash the
machine.

However, this avc:

[root@magnesium ~]# dmesg | grep avc
audit(1177362090.849:4): avc:  denied  { search } for  pid=1398 comm="mount"
name="/" dev=hda9 ino=2 scontext=system_u:system_r:mount_t:s0
tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

still prevents the fs from actually getting mounted.  This is due to
shortcomings in reiserfs as I understand it; see for example:
https://www.redhat.com/archives/fedora-selinux-list/2006-March/msg00129.html
Comment 5 Eric Sandeen 2007-04-23 17:29:17 EDT
*** Bug 211561 has been marked as a duplicate of this bug. ***
Comment 6 Dieter Bürßner 2007-04-24 16:08:35 EDT
(In reply to comment #2)

> Does the problem still exist on the latest FC6 kernel?

Very similar to what you have seen and reported in later comments. I dont get a
crash anymore with recent kernels, but Fedora won't mount the FS from /etc/fstab
while booting. Still on the command line mount will work.

Linux localhost.localdomain 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT
2007 x86_64 x86_64 x86_64 GNU/Linux
From dmesg:


<<
ReiserFS: sda7: found reiserfs format "3.6" with standard journal
ReiserFS: sda7: using ordered data mode
ReiserFS: sda7: journal params: device sda7, size 8192, journal first block 18,
max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda7: checking transaction log (sda7)
ReiserFS: sda7: Using r5 hash to sort names
audit(1177443600.505:5): avc:  denied  { search } for  pid=2917 comm="mount"
name="/" dev=sda7 ino=2 scontext=system_u:system_r:mount_t:s0
tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir
ReiserFS: sda7: warning: xattrs/ACLs enabled and couldn't find/create
.reiserfs_priv. Failing mount.
>>

Still, other Linux distros will mount the FS as expected. 

This does not look like fixed to me.
Comment 7 Chuck Ebbert 2007-04-24 17:07:57 EDT
I think this is an selinux problem? reiserfs stores its xattrs
in a file called /.reiserfs_priv and we're denying the filesystem
access to that.
Comment 8 Dieter Bürßner 2007-04-24 17:25:38 EDT
Sorry, I do not know all the etiquette here. I had originally opened this bug. 
Now I see "Status closed". This status seems very inappropriate to me. While 
the kernel does not crash anymore, it is still unable to mount a filesystem 
under the circumstances I had described. It seems I cannot change the status of 
this "Bugzilla Bug 220756" anymore. Seems everything I try to do, is futile 
here ... 
Comment 9 Jarod Wilson 2007-04-24 17:34:15 EDT
Bug history says you're the one who switched it from closed/currentrelease to
closed/wontfix...

In any case, the kernel bug is fixed, I'd suggest opening a new bug against
selinux-policy-targeted, referencing this bug.

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