Kernel Oops when disconnecting a mounted ext4 usb stick
A message that is not in the archive (sent off-list or not yet received): [email protected]/
https://bugzilla.kernel.org/show_bug.cgi?id=101011
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected], | |[email protected]
--- Comment #6 from [email protected] ---
This bug is still present in 4.2-rc6. Reverting:
commit 08439fec266c3cc5702953b4f54bdf5649357de0
Author: Christoph Hellwig <[email protected]> Date: Thu Apr 2 23:56:32 2015 -0400
ext4: remove block_device_ejected
bdi->dev now never goes away, so this function became useless.
makes the oops go away, at least for me (I've tested this on v4.1.4 i386 only). I hope this rings some bells.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
Maciej Szmigiero <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #7 from Maciej Szmigiero <[email protected]> --- I can also confirm that this bug is present in latest stable kernel (4.1.5) and reverting commit from comment 6 seems to fix it.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
--- Comment #8 from Theodore Tso <[email protected]> ---
Quoted 4 lines · On Fri, Aug 14, 2015 at 11:02:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=101011
I can also confirm that this bug is present in latest stable kernel (4.1.5) and reverting commit from comment 6 seems to fix it.
Christoph,
I've since gotten two reports from users that reverting your commit:
"08439fec266c3: ext4: remove block_device_ejected" fixes a crash when a USB stick is yanked from their system. Looking at the reported stack dump, it looks like the crash is happening in account_page_dirtied() when it updates some bdi-specific statistics.
I haven't been paying attention to the recent changes in how bdi gets torn down after the device gets removed, and in fact finding the recent changes wasn't obvioius enough after doing a brief search, but it seems to me that if reverting this patch is making any kind of differences, then the assertion in the commit description:
bdi->dev now never goes away, so this function became useless.
it implies that bdi->dev *does* become NULL, and checking for this is useful. In any case, I don't see any harm in reverting this commit; what do you think?
Thanks,
- Ted
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
--- Comment #9 from Christoph Hellwig <[email protected]> --- Hi Ted,
sorry for the delay - I saw the mail Jan Cc'ed me on yesterday. After my changes it should not go away and I had tested the original eject test that it indeed didn't. Either I forgot a case, or the major writeback Tejun did a little later regressed it.
As I won't have time to look into it ASAP I'd suggest to revert my patch for now. In the long run I really don't want to have these checks spread over file system so I plan to look into it once I get a few spare hours.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
--- Comment #10 from Theodore Tso <[email protected]> ---
Quoted 10 lines · Christoph Hellwig
sorry for the delay - I saw the mail Jan Cc'ed me on yesterday. After my changes it should not go away and I had tested the original eject test that it indeed didn't. Either I forgot a case, or the major writeback Tejun did a little later regressed it.
As I won't have time to look into it ASAP I'd suggest to revert my patch for now. In the long run I really don't want to have these checks spread over file system so I plan to look into it once I get a few spare hours.
Thanks, I'll revert the patch.
I suspect we should add an ioctl to simulate a USB device unplug using the loopback block device, so we can add a test to xfstests.
- Ted
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
Ronny Standtke <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #11 from Ronny Standtke <[email protected]> --- This bug is already hitting distributions, e.g. here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1478623
I hope this helps to get the right people into contact and sorry if I just added to the noise...
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
Theodore Tso <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #12 from Theodore Tso <[email protected]> ---
The revert is upstream as commit bdfe0cbd746aa9 and will be showing up stable backport kernels very shortly (the deadline for commenting on the stable backports is tonight, so the next stable backport kernels should be released within a day or so with the revert).
It's up to the distribution to update their kernels, and they don't have to wait for the stable kernel backports to be released. So please feel free to request at each of the various distro-specific bug trackers that they include the revert found in upstream commit bdfe0cbd746aa9. Especially if you are receiving paid support from the distribution, they are much more likely to listen to you. :-)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
Theodore Tso <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX--- Comment #13 from Theodore Tso <[email protected]> --- Resolving since this is fixed upstream....
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=101011
--- Comment #14 from Ronny Standtke <[email protected]> ---
Quoted 1 line
The revert is upstream as commit
bdfe0cbd746aa9
Thanks for the info! I will apply the revert to 4.2.1.
Quoted 2 lines
Especially if you are receiving paid support from the distribution, they are much more likely to listen to you. :-)
It's the other way around. I am maintaining a distribution and get paid for supporting it. :-)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.