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

Kamal Mostafa kamal at canonical.com
Fri Dec 20 20:21:05 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.8.y-queue branch of the 3.8.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.8.y-queue

This patch is scheduled to be released in version 3.8.13.15.

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.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 4654a4adc09fed01e37b03d15ed6688bc08ef490 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: Kamal Mostafa <kamal 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 2459730..6f33c3f 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -370,9 +370,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;
 }
@@ -426,9 +426,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