NeilBrown
94007751bb
Avoid dereferencing a 'request_queue' after last close.
...
On the last close of an 'md' device which as been stopped, the device
is destroyed and in particular the request_queue is freed. The free
is done in a separate thread so it might happen a short time later.
__blkdev_put calls bdev_inode_switch_bdi *after* ->release has been
called.
Since commit f758eeabeb96f878c860e8f110f94ec8820822a9
bdev_inode_switch_bdi will dereference the 'old' bdi, which lives
inside a request_queue, to get a spin lock. This causes the last
close on an md device to sometime take a spin_lock which lives in
freed memory - which results in an oops.
So move the called to bdev_inode_switch_bdi before the call to
->release.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
2011-09-10 17:20:21 +10:00
..
2011-08-01 02:10:06 -04:00
2011-07-20 20:47:59 -04:00
2011-07-20 20:48:03 -04:00
2011-08-08 12:02:43 -07:00
2011-08-17 13:31:24 -07:00
2011-05-28 01:02:50 -04:00
2011-08-21 07:02:00 -07:00
2011-07-20 01:44:21 -04:00
2011-07-26 13:38:50 -07:00
2011-08-18 16:55:10 +00:00
2011-07-20 20:47:59 -04:00
2011-05-28 01:02:54 -04:00
2011-07-17 23:22:02 -04:00
2011-05-19 16:55:28 +09:30
2011-07-25 22:49:19 -07:00
2011-08-09 23:29:01 -05:00
2011-07-20 01:44:26 -04:00
2011-08-06 22:56:03 -07:00
2011-08-01 13:48:31 -10:00
2011-08-11 17:23:40 -07:00
2011-08-21 06:59:41 -07:00
2011-08-18 14:16:13 -07:00
2011-05-10 10:16:21 +02:00
2011-07-21 10:59:16 -07:00
2011-07-25 22:49:19 -07:00
2011-08-01 13:48:31 -10:00
2011-07-20 20:47:59 -04:00
2011-07-22 19:02:39 -07:00
2011-07-20 20:47:59 -04:00
2011-07-20 20:47:59 -04:00
2011-07-27 22:21:58 -04:00
2011-07-25 21:00:19 -07:00
2011-07-22 19:42:12 -04:00
2011-06-28 00:06:41 +02:00
2011-07-10 22:05:08 -04:00
2011-08-01 02:10:06 -04:00
2011-08-15 08:40:24 -07:00
2011-07-27 13:23:02 -07:00
2011-07-20 20:47:59 -04:00
2011-07-20 20:47:53 -04:00
2011-07-20 20:47:59 -04:00
2011-08-18 22:47:13 -07:00
2011-07-25 22:49:19 -07:00
2011-07-20 20:47:59 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-08-01 02:10:06 -04:00
2011-07-26 13:05:28 -04:00
2011-07-01 16:17:13 +02:00
2011-08-06 11:51:33 -07:00
2011-07-22 16:14:39 -07:00
2011-05-25 08:39:26 -07:00
2011-08-01 02:10:06 -04:00
2011-06-27 18:00:12 -07:00
2011-07-25 22:50:35 -07:00
2011-07-20 01:43:24 -04:00
2011-05-28 01:02:50 -04:00
2011-07-22 19:02:39 -07:00
2011-07-20 01:43:07 -04:00
2011-07-20 01:44:26 -04:00
2011-08-22 16:37:24 -05:00
2011-07-26 12:57:09 -04:00
2011-07-20 20:47:47 -04:00
2011-07-20 20:47:59 -04:00
2011-07-20 01:43:10 -04:00
2011-07-20 01:43:10 -04:00
2011-05-03 10:10:51 +10:00
2011-07-20 01:43:10 -04:00
2011-05-28 14:44:46 +02:00
2011-09-10 17:20:21 +10:00
2011-06-16 11:44:46 -04:00
2011-08-07 22:24:41 -07:00
2011-07-15 18:58:42 -04:00
2011-08-06 22:52:40 -07:00
2011-05-31 16:33:35 +02:00
2011-07-26 16:49:47 -07:00
2011-05-25 08:39:26 -07:00
2011-07-26 16:49:47 -07:00
2011-08-11 11:24:42 -07:00
2011-07-26 16:49:47 -07:00
2011-04-28 11:28:20 -07:00
2011-07-31 22:52:08 +08:00
2011-08-01 02:10:06 -04:00
2011-08-06 22:53:23 -07:00
2011-07-20 01:44:38 -04:00
2011-08-03 14:25:25 -10:00
2011-07-22 19:42:11 -04:00
2011-07-20 20:23:19 -04:00
2011-07-15 18:58:42 -04:00
2011-05-25 08:39:26 -07:00
2011-05-26 10:01:43 -06:00
2011-08-07 13:42:25 -07:00
2011-07-24 10:08:32 -04:00
2011-07-26 15:07:43 -04:00
2011-07-26 12:57:09 -04:00
2011-08-01 02:10:32 -04:00
2011-07-26 12:57:09 -04:00
2011-07-25 20:57:11 -07:00
2011-08-03 14:25:24 -10:00
2011-08-06 22:53:23 -07:00
2011-07-25 10:33:36 -07:00
2011-07-20 20:47:59 -04:00
2011-06-14 11:46:14 +02:00
2011-05-28 12:02:09 -04:00