lkml.org 
[lkml]   [2018]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH URGENT for ftrace/core] lockdep: Fix error due to incorrect pointer return
Date
From: "Joel Fernandes (Google)" <joel@joelfernandes.org>

The 0-day bot caught an issue which all my tests missed (will add it
into my tests) where this_cpu_ptr is incorrectly returning the wrong
pointer from get_lock_stats. Fix it.

Fixes: f4ac253a8df0 ("lockdep: use this_cpu_ptr instead of get_cpu_var stats")
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
kernel/locking/lockdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index a6a6b7eb4b82..03bfaeb9f4e6 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -249,7 +249,7 @@ void clear_lock_stats(struct lock_class *class)

static struct lock_class_stats *get_lock_stats(struct lock_class *class)
{
- return &this_cpu_ptr(&cpu_lock_stats)[class - lock_classes];
+ return &this_cpu_ptr(cpu_lock_stats)[class - lock_classes];
}

static void lock_release_holdtime(struct held_lock *hlock)
--
2.18.0.345.g5c9ce644c3-goog
\
 
 \ /
  Last update: 2018-07-28 06:16    [W:0.037 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site