]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
RDMA/uverbs: Do not discard the IB_EVENT_DEVICE_FATAL event
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 7 May 2020 06:33:47 +0000 (09:33 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 12 May 2020 20:02:25 +0000 (17:02 -0300)
commitc485b19d52c4ba269dfd027945dee81755fdd530
tree2e47f16c2ca83db8d43bd403dce1e4e066f7f95c
parentc8b1f340e54158662acfa41d6dee274846370282
RDMA/uverbs: Do not discard the IB_EVENT_DEVICE_FATAL event

The commit below moved all of the destruction to the disassociate step and
cleaned up the event channel during destroy_uobj.

However, when ib_uverbs_free_hw_resources() pushes IB_EVENT_DEVICE_FATAL
and then immediately goes to destroy all uobjects this causes
ib_uverbs_free_event_queue() to discard the queued event if userspace
hasn't already read() it.

Unlike all other event queues async FD needs to defer the
ib_uverbs_free_event_queue() until FD release. This still unregisters the
handler from the IB device during disassociation.

Fixes: 3e032c0e92aa ("RDMA/core: Make ib_uverbs_async_event_file into a uobject")
Link: https://lore.kernel.org/r/20200507063348.98713-2-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/rdma_core.c
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/core/uverbs_std_types_async_fd.c