]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Tue, 12 Oct 2021 22:31:42 +0000 (16:31 -0600)
commit4f2e83fb7b7d48ba1d30e8f8b02843aa84d67377
treed6131e9133db73e1f20145b1146c2068f23adffb
parentd4241f8aaf799527387eab41718c264893725d77
net/mlx5: Fix potential sleeping in atomic context

BugLink: https://bugs.launchpad.net/bugs/1946802
commit ee27e330a953595903979ffdb84926843595a9fe upstream.

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: 693c6883bbc4 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c