[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-347-g7e97d2c
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2013-08-01 09:49:59
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 7e97d2c53099150b57f92e3eafd68e9bb2f211bf (commit)
from 061b7847e268e708078d56a4a46ac9f222bf0c98 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7e97d2c53099150b57f92e3eafd68e9bb2f211bf
Author: Fabien Marteau <fab...@ar...>
Date: Thu Aug 1 12:06:49 2013 +0200
[linux] microSD bug correction (patch 2.6.39-stable backport)
-----------------------------------------------------------------------
Summary of changes:
...kdev_get-should-access-bd_disk-only-after.patch | 40 ++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/2.6.38/452-BACKPORT_2_6_39-block-blkdev_get-should-access-bd_disk-only-after.patch
diff --git a/patches/linux/2.6.38/452-BACKPORT_2_6_39-block-blkdev_get-should-access-bd_disk-only-after.patch b/patches/linux/2.6.38/452-BACKPORT_2_6_39-block-blkdev_get-should-access-bd_disk-only-after.patch
new file mode 100644
index 0000000..956b041
--- /dev/null
+++ b/patches/linux/2.6.38/452-BACKPORT_2_6_39-block-blkdev_get-should-access-bd_disk-only-after.patch
@@ -0,0 +1,40 @@
+From 4c49ff3fe128ca68dabd07537415c419ad7f82f9 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj...@ke...>
+Date: Wed, 1 Jun 2011 08:27:41 +0200
+Subject: block: blkdev_get() should access ->bd_disk only after
+ success
+
+From: Tejun Heo <tj...@ke...>
+
+commit 4c49ff3fe128ca68dabd07537415c419ad7f82f9 upstream.
+
+d4dc210f69 (block: don't block events on excl write for non-optical
+devices) added dereferencing of bdev->bd_disk to test
+GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE; however, bdev->bd_disk can be
+%NULL if open failed which can lead to an oops.
+
+Test the flag after testing open was successful, not before.
+
+Signed-off-by: Tejun Heo <tj...@ke...>
+Reported-by: David Miller <da...@da...>
+Tested-by: David Miller <da...@da...>
+Signed-off-by: Jens Axboe <ja...@fu...>
+Signed-off-by: Greg Kroah-Hartman <gr...@su...>
+
+---
+ fs/block_dev.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/block_dev.c
++++ b/fs/block_dev.c
+@@ -1272,8 +1272,8 @@ int blkdev_get(struct block_device *bdev
+ * individual writeable reference is too fragile given the
+ * way @mode is used in blkdev_get/put().
+ */
+- if ((disk->flags & GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE) &&
+- !res && (mode & FMODE_WRITE) && !bdev->bd_write_holder) {
++ if (!res && (mode & FMODE_WRITE) && !bdev->bd_write_holder &&
++ (disk->flags & GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE)) {
+ bdev->bd_write_holder = true;
+ disk_block_events(disk);
+ }
hooks/post-receive
--
armadeus
|