]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 23:51:54 +0000 (16:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 23:51:54 +0000 (16:51 -0700)
added patches:
bio-integrity-fix-use-of-bs-bio_integrity_pool-after-free.patch
cfq-explicitly-use-64bit-divide-operation-for-64bit-arguments.patch

queue-3.11/bio-integrity-fix-use-of-bs-bio_integrity_pool-after-free.patch [new file with mode: 0644]
queue-3.11/cfq-explicitly-use-64bit-divide-operation-for-64bit-arguments.patch [new file with mode: 0644]
queue-3.11/series

diff --git a/queue-3.11/bio-integrity-fix-use-of-bs-bio_integrity_pool-after-free.patch b/queue-3.11/bio-integrity-fix-use-of-bs-bio_integrity_pool-after-free.patch
new file mode 100644 (file)
index 0000000..76a5a7a
--- /dev/null
@@ -0,0 +1,35 @@
+From adbe6991efd36104ac9eaf751993d35eaa7f493a Mon Sep 17 00:00:00 2001
+From: Bjorn Helgaas <bhelgaas@google.com>
+Date: Wed, 29 May 2013 16:29:55 -0600
+Subject: bio-integrity: Fix use of bs->bio_integrity_pool after free
+
+From: Bjorn Helgaas <bhelgaas@google.com>
+
+commit adbe6991efd36104ac9eaf751993d35eaa7f493a upstream.
+
+This fixes a copy and paste error introduced by 9f060e2231
+("block: Convert integrity to bvec_alloc_bs()").
+
+Found by Coverity (CID 1020654).
+
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Acked-by: Kent Overstreet <koverstreet@google.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Cc: Jonghwan Choi <jhbird.choi@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/bio-integrity.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/bio-integrity.c
++++ b/fs/bio-integrity.c
+@@ -734,7 +734,7 @@ void bioset_integrity_free(struct bio_se
+               mempool_destroy(bs->bio_integrity_pool);
+       if (bs->bvec_integrity_pool)
+-              mempool_destroy(bs->bio_integrity_pool);
++              mempool_destroy(bs->bvec_integrity_pool);
+ }
+ EXPORT_SYMBOL(bioset_integrity_free);
diff --git a/queue-3.11/cfq-explicitly-use-64bit-divide-operation-for-64bit-arguments.patch b/queue-3.11/cfq-explicitly-use-64bit-divide-operation-for-64bit-arguments.patch
new file mode 100644 (file)
index 0000000..e64029a
--- /dev/null
@@ -0,0 +1,37 @@
+From f3cff25f05f2ac29b2ee355e611b0657482f6f1d Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Sun, 22 Sep 2013 12:43:47 -0600
+Subject: cfq: explicitly use 64bit divide operation for 64bit arguments
+
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+
+commit f3cff25f05f2ac29b2ee355e611b0657482f6f1d upstream.
+
+'samples' is 64bit operant, but do_div() second parameter is 32.
+do_div silently truncates high 32 bits and calculated result
+is invalid.
+
+In case if low 32bit of 'samples' are zeros then do_div() produces
+kernel crash.
+
+Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
+Acked-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Cc: Jonghwan Choi <jhbird.choi@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ block/cfq-iosched.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/block/cfq-iosched.c
++++ b/block/cfq-iosched.c
+@@ -1803,7 +1803,7 @@ static u64 cfqg_prfill_avg_queue_size(st
+       if (samples) {
+               v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum);
+-              do_div(v, samples);
++              v = div64_u64(v, samples);
+       }
+       __blkg_prfill_u64(sf, pd, v);
+       return 0;
index e74f02d28f41939e6a9947a187b57cb39bf6cc2c..b5e6b07813ce839bf1d13fa7f7b7279d5c06c553 100644 (file)
@@ -60,3 +60,5 @@ udf-standardize-return-values-in-mount-sequence.patch
 udf-refuse-rw-mount-of-the-filesystem-instead-of-making-it-ro.patch
 audit-fix-endless-wait-in-audit_log_start.patch
 mm-fix-aio-performance-regression-for-database-caused-by-thp.patch
+bio-integrity-fix-use-of-bs-bio_integrity_pool-after-free.patch
+cfq-explicitly-use-64bit-divide-operation-for-64bit-arguments.patch