From: Mikulas Patocka Date: Fri, 13 Sep 2013 21:42:24 +0000 (-0400) Subject: dm stats: fix possible counter corruption on 32-bit systems X-Git-Tag: v3.12-rc3~25^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbf3f8cbdc139860a14c4fc2bb25432427045aaa;p=pandora-kernel.git dm stats: fix possible counter corruption on 32-bit systems There was a deliberate race condition in dm_stat_for_entry() to avoid the overhead of disabling and enabling interrupts. The race could result in some events not being counted on 64-bit architectures. However, on 32-bit architectures, operations on long long variables are not atomic, so the race condition could cause the counter to jump by 2^32. Such jumps could be disruptive, so we need to do proper locking on 32-bit architectures. Signed-off-by: Mikulas Patocka Cc: Alasdair G. Kergon Signed-off-by: Mike Snitzer --- Reading git-diff-tree failed