aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types_mr.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-07-10 20:55:15 -0600
committerJason Gunthorpe <jgg@mellanox.com>2018-07-25 14:21:21 -0600
commitc561c288463102b12c9089a42c6c2a9f55c4fb53 (patch)
tree4264c61e2b4327f89977b9c555f5814a636fb9db /drivers/infiniband/core/uverbs_std_types_mr.c
parentIB/uverbs: Handle IDR and FD types without truncation (diff)
downloadlinux-dev-c561c288463102b12c9089a42c6c2a9f55c4fb53.tar.xz
linux-dev-c561c288463102b12c9089a42c6c2a9f55c4fb53.zip
IB/uverbs: Clarify the kref'ing ordering for alloc_commit
The alloc_commit callback makes the uobj visible to other threads, and it does so using a 'move' semantic of the uobj kref on the stack into the public storage (eg the IDR, uobject list and file_private_data) Once this is done another thread could start up and trigger deletion of the kref. Fortunately cleanup_rwsem happens to prevent this from being a bug, but that is a fantastically unclear side effect. Re-organize things so that alloc_commit is that last thing to touch the uobj, get rid of the sneaky implicit dependency on cleanup_rwsem, and add a comment reminding that uobj is no longer kref'd after alloc_commit. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_mr.c')
0 files changed, 0 insertions, 0 deletions