UPSTREAM: rculist: Consolidate DEBUG_LIST for list_add_rcu()

(cherry-picked from 54acd4397d7e7a725c94101180cd9f38ef701acc)

This commit consolidates the debug checking for list_add_rcu() into the
new single __list_add_valid() debug function.  Notably, this commit fixes
the sanity check that was added in commit 17a801f4bfeb ("list_debug:
WARN for adding something already in the list"), which wasn't checking
RCU-protected lists.

Change-Id: If79fb3ce40d16ab75830ffbcfbd83f8676b1705e
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Satya Tangirala <satyat@google.com>
2 files changed