]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Move IB_EVENT_DEVICE_FATAL to destroy_uobj
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 7 May 2020 06:33:48 +0000 (09:33 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 12 May 2020 20:02:25 +0000 (17:02 -0300)
commit0cb344ac1cdf6f7ac26cb48d5ffa09ce16265688
treea02958b6f45b40b1f7dc32b7688210a6c157c3d9
parentbe28d9b7f572c9587b9d825b8b4c3c03d78b379f
RDMA/uverbs: Move IB_EVENT_DEVICE_FATAL to destroy_uobj

When multiple async FDs were allowed to exist the idea was for all
broadcast events to be delivered to all async FDs, however
IB_EVENT_DEVICE_FATAL was missed.

Instead of having ib_uverbs_free_hw_resources() special case the global
async_fd, have it cause the event during the uobject destruction. Every
async fd is now a uobject so simply generate the IB_EVENT_DEVICE_FATAL
while destroying the async fd uobject. This ensures every async FD gets a
copy of the event.

Fixes: 975a8fa497e4 ("RDMA/core: Add UVERBS_METHOD_ASYNC_EVENT_ALLOC")
Link: https://lore.kernel.org/r/20200507063348.98713-3-leon@kernel.org
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/core/uverbs_std_types_async_fd.c