Jason Gunthorpe ec6f8401c4 IB/uverbs: Fix unbalanced unlock on error path for rdma_explicit_destroy
If remove_commit fails then the lock is left locked while the uobj still
exists. Eventually the kernel will deadlock.

lockdep detects this and says:

 test/4221 is leaving the kernel with locks still held!
 1 lock held by test/4221:
  #0:  (&ucontext->cleanup_rwsem){.+.+}, at: [<000000001e5c7523>] rdma_explicit_destroy+0x37/0x120 [ib_uverbs]

Fixes: 4da70da23e9b ("IB/core: Explicitly destroy an object while keeping uobject")
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-02-15 15:31:26 -07:00
..
2017-12-18 15:37:10 -07:00
2015-06-12 14:49:18 -04:00
2015-05-05 13:21:27 -04:00
2016-01-19 15:25:45 -05:00
2016-05-13 13:37:18 -04:00
2016-03-03 10:20:25 -05:00
2017-08-31 08:35:09 -04:00
2018-02-11 14:34:03 -08:00
2016-03-03 10:20:25 -05:00
2017-12-18 15:37:06 -07:00