mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 17:30:53 +07:00
macvtap: rcu_dereference outside read-lock section
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 <yefremov.denis@gmail.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2359a47671
commit
3a7f8c34fe
@ -94,7 +94,8 @@ static int get_slot(struct macvlan_dev *vlan, struct macvtap_queue *q)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_MACVTAP_QUEUES; i++) {
|
||||
if (rcu_dereference(vlan->taps[i]) == q)
|
||||
if (rcu_dereference_protected(vlan->taps[i],
|
||||
lockdep_is_held(&macvtap_lock)) == q)
|
||||
return i;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user