[3.11.y.z extended stable] Patch "=?UTF-8?q?Update=20of=20blkg=5Fstat=20and=20blkg=5Frwstat=20may?=" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Dec 11 14:40:44 UTC 2013


This is a note to let you know that I have just added a patch titled

    =?UTF-8?q?Update=20of=20blkg=5Fstat=20and=20blkg=5Frwstat=20may?=

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From fe96a89cd4fda1afd6001d8227975bb6ed50ff8e Mon Sep 17 00:00:00 2001
From: Hong Zhiguo <zhiguohong at tencent.com>
Date: Wed, 20 Nov 2013 10:35:05 -0700
Subject: =?UTF-8?q?Update=20of=20blkg=5Fstat=20and=20blkg=5Frwstat=20may?=
 =?UTF-8?q?=20happen=20in=20bh=20context.=0AWhile=20u64=5Fstats=5Ffetch=5F?=
 =?UTF-8?q?retry=20is=20only=20preempt=5Fdisable=20on=2032bit=0AUP=20syste?=
 =?UTF-8?q?m.=20This=20is=20not=20enough=20to=20avoid=20preemption=20by=20?=
 =?UTF-8?q?bh=20and=0Amay=20read=20strange=2064=20bit=20value.?=

commit 2c575026fae6e63771bd2a4c1d407214a8096a89 upstream.

Signed-off-by: Hong Zhiguo <zhiguohong at tencent.com>
Acked-by: Tejun Heo <tj at kernel.org>
Signed-off-by: Jens Axboe <axboe at kernel.dk>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 block/blk-cgroup.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 8056c03..f50082d 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -433,9 +433,9 @@ static inline uint64_t blkg_stat_read(struct blkg_stat *stat)
 	uint64_t v;

 	do {
-		start = u64_stats_fetch_begin(&stat->syncp);
+		start = u64_stats_fetch_begin_bh(&stat->syncp);
 		v = stat->cnt;
-	} while (u64_stats_fetch_retry(&stat->syncp, start));
+	} while (u64_stats_fetch_retry_bh(&stat->syncp, start));

 	return v;
 }
@@ -501,9 +501,9 @@ static inline struct blkg_rwstat blkg_rwstat_read(struct blkg_rwstat *rwstat)
 	struct blkg_rwstat tmp;

 	do {
-		start = u64_stats_fetch_begin(&rwstat->syncp);
+		start = u64_stats_fetch_begin_bh(&rwstat->syncp);
 		tmp = *rwstat;
-	} while (u64_stats_fetch_retry(&rwstat->syncp, start));
+	} while (u64_stats_fetch_retry_bh(&rwstat->syncp, start));

 	return tmp;
 }
--
1.8.3.2





More information about the kernel-team mailing list