]> 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)
commit3223af2a249158557e398c0abeaa0e995b354a28
tree63f42899de4a27a495bd375218b914c52d735f13
parent1c07cc547e1ca7c86976ed1efbab505683c763b4
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