提交 189dbab0 编写于 作者: L Linus Torvalds

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
...@@ -4790,7 +4790,8 @@ void lockdep_invariant_state(bool force) ...@@ -4790,7 +4790,8 @@ void lockdep_invariant_state(bool force)
* Verify the former, enforce the latter. * Verify the former, enforce the latter.
*/ */
WARN_ON_ONCE(!force && current->lockdep_depth); 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) static int cross_lock(struct lockdep_map *lock)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册