mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
RAS/CEC: Increment cec_entered under the mutex lock
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
This commit is contained in:
parent
28156d7678
commit
09cbd2197e
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user