OpenCloudOS-Kernel/drivers/infiniband
Jason Gunthorpe 8bdf9dd984 RDMA/uverbs: Remove needs_kfree_rcu from uverbs_obj_type_class
After device disassociation the uapi_objects are destroyed and freed,
however it is still possible that core code can be holding a kref on the
uobject. When it finally goes to uverbs_uobject_free() via the kref_put()
it can trigger a use-after-free on the uapi_object.

Since needs_kfree_rcu is a micro optimization that only benefits file
uobjects, just get rid of it. There is no harm in using kfree_rcu even if
it isn't required, and the number of involved objects is small.

Link: https://lore.kernel.org/r/20200113143306.GA28717@ziepe.ca
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-01-13 16:17:18 -04:00
..
core RDMA/uverbs: Remove needs_kfree_rcu from uverbs_obj_type_class 2020-01-13 16:17:18 -04:00
hw IB/mlx5: Add mmap support for VAR 2020-01-12 19:49:13 -04:00
sw RDMA/rxe: Fix error type of mmap_offset 2020-01-03 19:43:51 -04:00
ulp IB/iser: use true,false for bool variable 2020-01-03 19:13:59 -04:00
Kconfig RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00