diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-07 04:39:44 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-07 04:39:44 +0300 |
commit | 189dbab0dddcf7d8525f32ae13d22ac95927fdb6 (patch) | |
tree | f72900c260b3f7612f94f37afca3619f3eb60b2d /kernel | |
parent | 61d6be3a7a1139285e16a672be72caefd4b1126b (diff) | |
parent | 5e351ad106997e06b2dc3da9c6b939b95f67fb88 (diff) | |
download | linux-189dbab0dddcf7d8525f32ae13d22ac95927fdb6.tar.xz |
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull lockdep fix from Ingo Molnar:
"Fix a possible NULL dereference for the (rare) case when a task
doesn't have ->xhlocks space allocated due to kmalloc() OOM-ing"
* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
locking/lockdep: Fix possible NULL deref
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/locking/lockdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 9776da8db180..670d8d7d8087 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -4790,7 +4790,8 @@ void lockdep_invariant_state(bool force) * Verify the former, enforce the latter. */ WARN_ON_ONCE(!force && current->lockdep_depth); - invalidate_xhlock(&xhlock(current->xhlock_idx)); + if (current->xhlocks) + invalidate_xhlock(&xhlock(current->xhlock_idx)); } static int cross_lock(struct lockdep_map *lock) |