[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465507015-23052-206-git-send-email-kamal@canonical.com>
Date: Thu, 9 Jun 2016 14:16:54 -0700
From: Kamal Mostafa <kamal@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Matthew Wilcox <willy@...ux.intel.com>,
Konstantin Khlebnikov <koct9i@...il.com>,
Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
Jan Kara <jack@...e.com>, Neil Brown <neilb@...e.de>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Kamal Mostafa <kamal@...onical.com>
Subject: [PATCH 4.2.y-ckt 205/206] drivers/hwspinlock: use correct radix tree API
4.2.8-ckt12 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Matthew Wilcox <willy@...ux.intel.com>
commit b76ba4af4ddd6a06f7f65769e7be1bc56556cdf5 upstream.
radix_tree_is_indirect_ptr() is an internal API. The correct call to
use is radix_tree_deref_retry() which has the appropriate unlikely()
annotation.
Fixes: c6400ba7e13a ("drivers/hwspinlock: fix race between radix tree insertion and lookup")
Signed-off-by: Matthew Wilcox <willy@...ux.intel.com>
Cc: Konstantin Khlebnikov <koct9i@...il.com>
Cc: Kirill Shutemov <kirill.shutemov@...ux.intel.com>
Cc: Jan Kara <jack@...e.com>
Cc: Neil Brown <neilb@...e.de>
Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@...onical.com>
---
drivers/hwspinlock/hwspinlock_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index d50c701..4074441 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -313,7 +313,7 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
hwlock = radix_tree_deref_slot(slot);
if (unlikely(!hwlock))
continue;
- if (radix_tree_is_indirect_ptr(hwlock)) {
+ if (radix_tree_deref_retry(hwlock)) {
slot = radix_tree_iter_retry(&iter);
continue;
}
--
2.7.4
Powered by blists - more mailing lists