All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 48431] New: ext4_fill_super() reports success even if ext4_mb_init() fails
Date: Fri,  5 Oct 2012 12:19:07 +0000 (UTC)	[thread overview]
Message-ID: <bug-48431-13602@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=48431

           Summary: ext4_fill_super() reports success even if
                    ext4_mb_init() fails
           Product: File System
           Version: 2.5
    Kernel Version: 3.6
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: ext4
        AssignedTo: fs_ext4@kernel-bugs.osdl.org
        ReportedBy: eugene.shatokhin@rosalab.ru
        Regression: No


Created an attachment (id=82361)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=82361)
The patch to fix the problem

If ext4_mb_init() called from ext4_fill_super() (fs/ext4/super.c:3980 in the
current ext4 git tree) fails and returns error code, ext4_fill_super() still
returns 0. 

This happens because the return value of ext4_mb_init() is not assigned to
'ret' in the error path. So the previous value of 'ret' (0) is returned from
ext4_fill_super().

This problem leads to a kernel oops in mount_fs() when the latter tries to
access the struct dentry that the mount() callback returns ("sb = root->d_sb;"
in fs/super.c:1180).

The problem has been revealed with the help of the fault simulation facilities
provided by KEDR Framework.

Attached is a trivial patch that fixes the problem.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

             reply	other threads:[~2012-10-05 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 12:19 bugzilla-daemon [this message]
2012-10-05 14:16 ` [Bug 48431] [PATCH]ext4_fill_super() reports success even if ext4_mb_init() fails bugzilla-daemon
2012-12-22  9:29 ` bugzilla-daemon
2013-01-02 17:00 ` bugzilla-daemon

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=bug-48431-13602@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.