From: "Theodore Ts'o" <tytso@mit.edu>
To: Nilesh More <nilesh99999@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Reporting a bug - Memory corruption in Linux kernel
Date: Thu, 6 Mar 2014 23:00:28 -0500 [thread overview]
Message-ID: <20140307040028.GA17965@thunk.org> (raw)
In-Reply-To: <CAMbOQaU-jX8Dvmjj_iQJGBhDesMyFj02epaROFfW+ae+BDg_tA@mail.gmail.com>
On Fri, Mar 07, 2014 at 01:39:45AM +0530, Nilesh More wrote:
> Hi all,
>
> I am working on android bug wherein directory entries of ext4 file
> system get corrupted when USB is hotplugged (with auto mount support
> enabled).
>
> The logs as below:
> [ 413.607849] usb 2-1.1: USB disconnect, device number 12
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hot plugged or hot unplugged? It looks like the problem is that the
block device disappeared out from under ext4. Maybe you have a flaky
SD/MMC drive (i.e., funky contacts, etc.)? Or maybe when you plug in
one USB device, the eMMC device where you have the mounted file system
disappeared?
> If I prevent kill_bdev from invalidating pages, I see a No-Repro for
> this bug. Also there are no prints saying invalid access to FAT
> entry(which were present when bug reproduces). Earlier we had no-repro
> when added delay(1) before _getblk.
>
> This points out to the loss of sync between _getblk and kill_bdev and
> ALSO looks like kill_bdev inadvertently invalidates pages which are
> Ext4 owned.
This looks like it's much more of a hardware issue than a software
issue. If you are plugging in a USB device, you should *not* be
getting a USB disconnect message. And the fact that the pages being
used by ext4 are getting invalidated would be consistent with the
theory that the USB device on which the ext4 file system was on is
somehow getting disconnected, per the message in you've shown in the
logs.
- Ted
next prev parent reply other threads:[~2014-03-07 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMbOQaUW7K=FBESVeo=BOXfYU6cuqthjnmMR6jmeNFnx8PcvuQ@mail.gmail.com>
2014-03-06 20:09 ` Reporting a bug - Memory corruption in Linux kernel Nilesh More
2014-03-07 4:00 ` Theodore Ts'o [this message]
2014-03-07 20:18 ` Nilesh More
2014-03-07 20:55 ` Nilesh More
2014-03-07 21:32 ` Theodore Ts'o
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=20140307040028.GA17965@thunk.org \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=nilesh99999@gmail.com \
/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