Re: [PATCH v2] drivers/md: use proper rcu accessor

2014-11-23 Thread Mike Snitzer
On Sun, Nov 23 2014 at 12:34pm -0500, Eric Dumazet wrote: > From: Eric Dumazet > > 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. > >

[PATCH v2] drivers/md: use proper rcu accessor

2014-11-23 Thread Eric Dumazet
From: Eric Dumazet 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

[PATCH v2] drivers/md: use proper rcu accessor

2014-11-23 Thread Eric Dumazet
From: Eric Dumazet eduma...@google.com 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,

Re: [PATCH v2] drivers/md: use proper rcu accessor

2014-11-23 Thread Mike Snitzer
On Sun, Nov 23 2014 at 12:34pm -0500, Eric Dumazet eric.duma...@gmail.com wrote: From: Eric Dumazet eduma...@google.com 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,