remarkable-linux/drivers/infiniband
Yishai Hadas 03c40442a0 IB/uverbs: Fix reference counting usage of event files
Fix the reference counting usage to be handled in the event file
creation/destruction function, instead of being done by the caller.
This is done for both async/non-async event files.

Based on Jason Gunthorpe report at https://www.mail-archive.com/
linux-rdma@vger.kernel.org/msg24680.html:
"The existing code for this is broken, in ib_uverbs_get_context all
the error paths between ib_uverbs_alloc_event_file and the
kref_get(file->ref) are wrong - this will result in fput() which will
call ib_uverbs_event_close, which will try to do kref_put and
ib_unregister_event_handler - which are no longer paired."

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-08-30 18:12:39 -04:00
..
core IB/uverbs: Fix reference counting usage of event files 2015-08-30 18:12:39 -04:00
hw IB/mlx5: Remove ib_get_dma_mr calls 2015-08-30 18:12:34 -04:00
ulp IB/core: Make ib_dealloc_pd return void 2015-08-30 18:12:39 -04:00
Kconfig RDMA/amso1100: Deprecate the amso1100 driver and move to staging 2015-08-28 22:54:49 -04:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00