From 34013933f06f31312660695d681db0d9b9defce3 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 23 Aug 2022 11:50:37 +0200 Subject: [PATCH] lib_log: safeguard suspected coherence problems 2 --- kernel/lib_log.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/lib_log.c b/kernel/lib_log.c index efb99917..c19f6743 100644 --- a/kernel/lib_log.c +++ b/kernel/lib_log.c @@ -720,6 +720,8 @@ int _check_crc(struct log_header *lh, check_flags, crc_len); check_flags |= usable_digest_mask; cond_resched(); + /* safeguard any suspected coherence problems */ + smp_mb(); goto retry; } /* when simple retry failed: try the painful iterative method */ @@ -747,6 +749,8 @@ int _check_crc(struct log_header *lh, goto failed; did_iterative_retry++; cond_resched(); + /* safeguard any suspected coherence problems */ + smp_mb(); goto retry; failed: MARS_WRN("ITERATIVE RETRY %d failed\n",