From: Eric Dumazet Date: Sun, 23 Nov 2014 17:34:29 +0000 (-0800) Subject: dm: use rcu_dereference_protected instead of rcu_dereference X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~22^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a12f5d48bdfeb5fe10157ac01c3de29269f457c6;p=pandora-kernel.git dm: use rcu_dereference_protected instead of rcu_dereference rcu_dereference() should be used in sections protected by rcu_read_lock. For writers, holding some kind of mutex or lock, rcu_dereference_protected() is the way to go, adding explicit lockdep bits. In __unbind(), we are the last user of this mapped device, so can use the constant '1' instead of a lockdep_is_held(), not consistent with other uses of rcu_dereference_protected() which use md->suspend_lock mutex. Reported-by: Kirill A. Shutemov Signed-off-by: Eric Dumazet Fixes: 33423974bfc1 ("dm: Use rcu_dereference() for accessing rcu pointer") Cc: Pranith Kumar [snitzer: allow lines longer than 80 columns, refine subject] Signed-off-by: Mike Snitzer --- Reading git-diff-tree failed