lkml.org 
[lkml]   [2024]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kgdbts: fix hw_access_break_test
Hi,

On Mon, Aug 12, 2024 at 1:55 AM Florian Rommel <mail@florommel.de> wrote:
>
> The test for access watchpoints (hw_access_break_test) was broken
> (always failed) because the compiler optimized out the write to the
> static helper variable (hw_break_val2), as it is never read anywhere.
> This resulted in the target variable (hw_break_val) not being accessed
> and thus the breakpoint not being triggered.
>
> Remove the helper variable (hw_break_val2), and use READ_ONCE to force
> reading the target variable (hw_break_val).
>
> Signed-off-by: Florian Rommel <mail@florommel.de>
> ---
> drivers/misc/kgdbts.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

\
 
 \ /
  Last update: 2024-08-12 22:05    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog