linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Torsten Hilbrich <torsten.hilbrich@secunet.com>
To: jmoyer@redhat.com
Cc: linux-ext4@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Kernel 3.3.8 breaks accidental ext3 mount of extended partition
Date: Mon, 18 Jun 2012 07:59:30 +0200	[thread overview]
Message-ID: <4FDEC3C2.4060909@secunet.com> (raw)

Hello,

a software that tries to mount each existing partition as ext3 file system started to fail when updating from v3.3.7 to v3.3.8.

The applications then hangs-up in the mount syscall, here is a snapshot of its stack at this moment:

[<ffffffff81060c6a>] __cond_resched+0x2a/0x40
[<ffffffff81134b3f>] __getblk+0x1bf/0x270
[<ffffffff811362b3>] __bread+0x13/0xb0
[<ffffffff81182222>] ext3_fill_super+0x132/0x1b00
[<ffffffff8110891a>] mount_bdev+0x1aa/0x1f0
[<ffffffff8117ffc5>] ext3_mount+0x15/0x20
[<ffffffff81107fc3>] mount_fs+0x43/0x1a0
[<ffffffff81123102>] vfs_kern_mount+0x72/0x100
[<ffffffff81123882>] do_kern_mount+0x52/0x110
[<ffffffff8112519a>] do_mount+0x25a/0x7d0
[<ffffffff811257a8>] sys_mount+0x98/0xf0
[<ffffffff814f3e92>] system_call_fastpath+0x16/0x1b

The expected behaviour (which was still there in v3.3.7) is that the mount syscall fails because the partition contains no valid ext3 file system.

I have create more snapshot of the stack in the following pastebin: http://pastebin.com/99x9EpnM

Using bisecting I found the following commit to be the cause of the issue:

commit 3735b0a1d73af536484ddefef4d8438dd468c4a6
Author: Jeff Moyer <jmoyer@redhat.com>
Date:   Fri May 11 16:34:10 2012 +0200

    block: don't mark buffers beyond end of disk as mapped
    
    commit 080399aaaf3531f5b8761ec0ac30ff98891e8686 upstream.
    
Reverting this commit brought back the desired behaviour of the mount syscall failing because of invalid superblock.

It seems to be that ext3_fill_super is unable to read the super block because there is no blocked for an extended partition.

The same issue can be found in v3.4, where the upstream commit (080399aa) was released.

This problem was found and debugged with an amd64 build of the linux kernel. The native ext3 support was used:

CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set

I will rewrite the application causing this issue to check the file system type before trying to mount the partition to work around this problem for now.

	Torsten

             reply	other threads:[~2012-06-18  6:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18  5:59 Torsten Hilbrich [this message]
2012-06-18 19:03 ` Kernel 3.3.8 breaks accidental ext3 mount of extended partition Jeff Moyer
2012-06-19  5:59   ` Torsten Hilbrich
2012-06-19 17:43     ` Jeff Moyer
2012-06-20  6:14       ` Torsten Hilbrich
2012-06-22  0:12       ` Jan Kara
2012-06-22 12:33         ` Jeff Moyer
2012-06-20 12:18   ` Marcos Mello
2012-06-25 11:34 ` Richard W.M. Jones
2012-06-25 16:38   ` Jeff Moyer
2012-06-25 16:58     ` Richard W.M. Jones
2012-06-25 19:32     ` Richard W.M. Jones
2012-06-25 20:04       ` Jeff Moyer
2012-06-26  6:07     ` Torsten Hilbrich
2012-06-26 13:02       ` Jeff Moyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FDEC3C2.4060909@secunet.com \
    --to=torsten.hilbrich@secunet.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).