[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170314194402.15834-1-robert.foss@collabora.com>
Date: Tue, 14 Mar 2017 15:44:02 -0400
From: Robert Foss <robert.foss@...labora.com>
To: peterz@...radead.org, mingo@...hat.com,
linux-kernel@...r.kernel.org
Cc: Robert Foss <robert.foss@...labora.com>
Subject: [PATCH RESEND v1] locking/ww_mutex: Prevent read of uninitialized memory
On "missed ABBA deadlock" abba.result is read, but not initialized
in all situations.
Detected by CoverityScan, CID#1402035 ("Uninitialized scalar variable")
Signed-off-by: Robert Foss <robert.foss@...labora.com>
---
kernel/locking/test-ww_mutex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c
index 6b7abb334ca6..beb76693ccfa 100644
--- a/kernel/locking/test-ww_mutex.c
+++ b/kernel/locking/test-ww_mutex.c
@@ -196,7 +196,7 @@ static void test_abba_work(struct work_struct *work)
static int test_abba(bool resolve)
{
- struct test_abba abba;
+ struct test_abba abba = { 0 };
struct ww_acquire_ctx ctx;
int err, ret;
--
2.11.0.453.g787f75f05
Powered by blists - more mailing lists