]> git.baikalelectronics.ru Git - kernel.git/commit
mlx5_core: Fix possible race between mr tree insert/delete
authorSagi Grimberg <sagig@mellanox.com>
Sun, 8 Jun 2014 07:00:59 +0000 (10:00 +0300)
committerRoland Dreier <roland@purestorage.com>
Wed, 9 Jul 2014 23:58:58 +0000 (16:58 -0700)
commit557a6168037eca8c6e666f17c94f2944d590e964
tree8210877bc950e9b09a37d65fd78b9fd204e5dc30
parentdad65f214dcb12470d80fac0c10a00cc171b7834
mlx5_core: Fix possible race between mr tree insert/delete

In mlx5_core_destroy_mkey(), we must first remove the mr from the
radix tree and then destroy it.  Otherwise we might hit a race if the
key was reallocated and we attempted to insert it to the radix tree.

Also handle radix tree insert/delete failures.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Eli Cohen <elic@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx5/core/mr.c