Jason Gunthorpe 104f268d43 IB/uverbs: Improve lockdep_check
This is really being used as an assert that the expected usecnt
is being held and implicitly that the usecnt is valid. Rename it to
assert_uverbs_usecnt and tighten the checks to only accept valid
values of usecnt (eg 0 and < -1 are invalid).

The tigher checkes make the assertion cover more cases and is more
likely to find bugs via syzkaller/etc.

Fixes: 3832125624b7 ("IB/core: Add support for idr types")
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-02-15 14:59:47 -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
2018-02-15 14:59:47 -07: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