]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix potential sleeping in atomic context
authorMaor Gottlieb <maorg@nvidia.com>
Wed, 1 Sep 2021 08:48:13 +0000 (11:48 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 7 Sep 2021 21:16:55 +0000 (14:16 -0700)
commitccd803e5232edba7a538b4d81e05917b03f4f7a4
treec8a12259f83501822090dc6ada558cde4726de85
parentf65b35a791452e8fe16cd0a9557e28657f4c57cd
net/mlx5: Fix potential sleeping in atomic context

Fixes the below flow of sleeping in atomic context by releasing
the RCU lock before calling to free_match_list.

build_match_list() <- disables preempt
-> free_match_list()
   -> tree_put_node()
      -> down_write_ref_node() <- take write lock

Fixes: 83107e1e2bf2 ("net/mlx5: Add hash table for flow groups in flow table")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c