net: dsa: mv88e6xxx: lock mutex in port_fdb_dump
authorVivien Didelot <vivien.didelot@gmail.com>
Wed, 12 Jun 2019 16:42:47 +0000 (12:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2019 17:50:54 +0000 (10:50 -0700)
commitfcf15367cbd90e5fd6f69d73a1d512fbb7ca2748
tree63f42899de4a27a495bd375218b914c52d735f13
parent0114214eca21e85d66a5e206f803db42d1d07960
net: dsa: mv88e6xxx: lock mutex in port_fdb_dump

During a port FDB dump operation, the mutex protecting the concurrent
access to the switch registers is currently held by the internal
mv88e6xxx_port_db_dump and mv88e6xxx_port_db_dump_fid helpers.

It must be held at the higher level in mv88e6xxx_port_fdb_dump which
is called directly by DSA through ds->ops->port_fdb_dump. Fix this.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c