In this case it is not an error. rcu_dereference
occurs in update section. Replacement by
rcu_dereference_protected (with spinlock) in order to
prevent lockdep complaint.
Found by Linux Driver Verification project (linuxtesting.org)
Signed-off-by: Denis Efremov <redacted>
---
drivers/net/macvtap.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
- if (rcu_dereference(vlan->taps[i]) == q)
+ if (rcu_dereference_protected(vlan->taps[i],
+ lockdep_is_held(&macvtap_lock)) == q)
You must use the proper combination of TAB character and spaces
to line up the lockdep_is_held() argument with the first column
after openning "(" on the previous line.
Never be lazy and use only TABs.
rcu_dereference occurs in update section. Replacement by
rcu_dereference_protected in order to prevent lockdep
complaint.
Found by Linux Driver Verification project (linuxtesting.org)
Signed-off-by: Denis Efremov <redacted>
---
drivers/net/macvtap.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2012-08-12 08:48:39
On Sun, Aug 12, 2012 at 10:26:31AM +0400, Denis Efremov wrote:
quoted hunk
rcu_dereference occurs in update section. Replacement by
rcu_dereference_protected in order to prevent lockdep
complaint.
Found by Linux Driver Verification project (linuxtesting.org)
Signed-off-by: Denis Efremov <redacted>
---
drivers/net/macvtap.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
And now it's too long. Maybe a temporary would be better?
struct macvtap_queue *t;
t = rcu_dereference_protected(vlan->taps[i],
lockdep_is_held(&macvtap_lock));
if (t == q)
return i;
?
Anyway -
Acked-by: Michael S. Tsirkin <mst@redhat.com>
From: David Miller <davem@davemloft.net> Date: 2012-08-12 20:41:21
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Sun, 12 Aug 2012 11:49:29 +0300
On Sun, Aug 12, 2012 at 10:26:31AM +0400, Denis Efremov wrote:
quoted
rcu_dereference occurs in update section. Replacement by
rcu_dereference_protected in order to prevent lockdep
complaint.
Found by Linux Driver Verification project (linuxtesting.org)
Signed-off-by: Denis Efremov <redacted>