]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit69750237c133b88ee7bfaf2ad78e9f77aa083976
tree63f42899de4a27a495bd375218b914c52d735f13
parentc234e8e93892d8083d8758fa612dda00c2eefb99
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