lkml.org 
[lkml]   [2012]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: Fix mod_timer crash when removing USB sticks
On Thu, Jan 12, 2012 at 01:15:35PM -0800, Paul Taysom wrote:
> From: Paul Taysom <taysom@google.com>
>
> A USB stick with a ext file system on it, would occasionally crash
> when the stick was pulled.
>
> The problem was a timer was being set on the Backing Device Interface,
> bdi, after the USB device had been removed and the bdi had been
> unregistered. The bdi would then be later reinitialized by zeroing
> the timer without removing from the timer from the timer queue.
> This would eventually result in a kernel crash (NULL ptr dereference).
>
> When the bdi is unregistered, the dev field is set to NULL. This
> indication is used by bdi_unregister to only unregister the device
> once.
>
> Fix: When the backing device is invalidated, the mapping backing_dev_info
> should be redirected to the default_backing_dev_info.
>
> Created 3 USB sticks with ext2, ext4 and one with both apple and DOS
> file systems on it. Inserted and removed USB sticks many times in random
> order. With out the bug fix, the kernel would soon crash. With the fix,
> it did not. Ran on both stumpy and amd64-generic.
>
> Change-Id: Icdd06cf3ced555dcd9994cfcc9478a9071a802f1

What is this field for? It makes no sense for a kernel patch
submission.

> Signed-off-by: Paul Taysom <taysom@chromium.org>
> Downstream-bug-report: http://crosbug.com/24165

Is that a regular field that we now use?

And shouldn't this go to the stable kernel releases as well?

Third time's a charm?

greg k-h


\
 
 \ /
  Last update: 2012-01-12 22:41    [W:0.270 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site