]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Fix async events cleanup flows
authorYishai Hadas <yishaih@mellanox.com>
Wed, 12 Feb 2020 07:26:32 +0000 (09:26 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 13 Feb 2020 13:48:17 +0000 (09:48 -0400)
commitf982fb91fb1278634cc42d30180a5c7d66ed91a8
tree695a280aa57708cedd68bdd77c8f5255a85e096a
parentbb206ef12b986abf06606be48ec0ee4dbde79aff
RDMA/mlx5: Fix async events cleanup flows

As in the prior patch, the devx code is not fully cleaning up its
event_lists before finishing driver_destroy allowing a later read to
trigger user after free conditions.

Re-arrange things so that the event_list is always empty after destroy and
ensure it remains empty until the file is closed.

Fixes: d8cc350758cf ("RDMA/core: Simplify destruction of FD uobjects")
Link: https://lore.kernel.org/r/20200212072635.682689-7-leon@kernel.org
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/devx.c