Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594432 > unrolled thread
| Started by | Robert Foss <robert.foss@collabora.com> |
|---|---|
| First post | 2017-03-07 18:00 +0100 |
| Last post | 2017-03-07 18:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v1] locking/ww_mutex: Prevent read of uninitialized memory Robert Foss <robert.foss@collabora.com> - 2017-03-07 18:00 +0100
| From | Robert Foss <robert.foss@collabora.com> |
|---|---|
| Date | 2017-03-07 18:00 +0100 |
| Subject | [PATCH v1] locking/ww_mutex: Prevent read of uninitialized memory |
| Message-ID | <tiqCS-1Sc-11@gated-at.bofh.it> |
abba.result is potentially uninitialized, but read during one
error condition.
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@collabora.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 da6c9a34f62f..d11ad012bae6 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
Back to top | Article view | linux.kernel
csiph-web