projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28156d7
)
RAS/CEC: Increment cec_entered under the mutex lock
author
WANG Chao
<chao.wang@ucloud.cn>
Thu, 18 Apr 2019 03:41:14 +0000
(
03:41
+0000)
committer
Borislav Petkov
<bp@suse.de>
Sat, 20 Apr 2019 10:16:52 +0000
(12:16 +0200)
Modify ->cec_entered in the critical section of the mutex.
Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link:
https://lkml.kernel.org/r/20190418034115.75954-2-chao.wang@ucloud.cn
drivers/ras/cec.c
patch
|
blob
|
history
diff --git
a/drivers/ras/cec.c
b/drivers/ras/cec.c
index
2d9ec37
..
88e4f3f
100644
(file)
--- a/
drivers/ras/cec.c
+++ b/
drivers/ras/cec.c
@@
-286,10
+286,10
@@
int cec_add_elem(u64 pfn)
if (!ce_arr.array || ce_arr.disabled)
return -ENODEV;
- ca->ces_entered++;
-
mutex_lock(&ce_mutex);
+ ca->ces_entered++;
+
if (ca->n == MAX_ELEMS)
WARN_ON(!del_lru_elem_unlocked(ca));