summaryrefslogtreecommitdiff
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2016-02-02 16:57:55 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-25 12:01:23 -0800
commit077b6173a8c89d666a06203f42267ff8b6d02d73 (patch)
tree436055b69d5506cfc4990a94d4251f4bd517dd90 /lib/dump_stack.c
parentf4595e0081495b677a98c780e9ec1ab68ce89488 (diff)
drivers/hwspinlock: fix race between radix tree insertion and lookup
commit c6400ba7e13a41539342f1b6e1f9e78419cb0148 upstream. of_hwspin_lock_get_id() is protected by the RCU lock, which means that insertions can occur simultaneously with the lookup. If the radix tree transitions from a height of 0, we can see a slot with the indirect_ptr bit set, which will cause us to at least read random memory, and could cause other havoc. Fix this by using the newly introduced radix_tree_iter_retry(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dump_stack.c')
0 files changed, 0 insertions, 0 deletions