]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Increase scope of RCU read-side critical section
authorIdo Schimmel <idosch@mellanox.com>
Wed, 29 Jul 2020 09:26:45 +0000 (12:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jul 2020 19:16:21 +0000 (12:16 -0700)
commitfb1daa17966b0196cdab30aa24b617655a0cee04
tree625e2105616b54d122267c0c790f2ffeee7ae8a1
parentd2f620b0928fafbf7452e73ebe6aa38b26e78996
mlxsw: core: Increase scope of RCU read-side critical section

The lifetime of the Rx listener item ('rxl_item') is managed using RCU,
but is dereferenced outside of RCU read-side critical section, which can
lead to a use-after-free.

Fix this by increasing the scope of the RCU read-side critical section.

Fixes: d8cf4a008cb3 ("mlxsw: Introduce Mellanox switch driver core")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c