]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ib/core: init shared-pd ref count to 1, and add cleanup
authorArun Kaimalettu <arun.kaimalettu@oracle.com>
Mon, 18 Jul 2011 12:21:34 +0000 (15:21 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Fri, 11 Sep 2015 17:14:25 +0000 (10:14 -0700)
commit557de4896556e7e228330143457b6f626db2b844
tree87c5d96eccb14ae05ed248c4861d2440a589973d
parenta1911c2c180d2d3b8a9261d25e23c7f962691e7f
ib/core: init shared-pd ref count to 1, and add cleanup

When shpd is created it is already referred to by parent 'pd',
so shpd->shared should be '1' initially (and not '0');
otherwise, the 'shpd' memory may get freed/reallocated
while it is still being referred to by one last pd.

Additionally, add shared-pd cleanup to ucontext cleanup flow.

Orabug: 21496696

Signed-off-by: Arun Kaimalettu <arun.kaimalettu@oracle.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
(Ported from UEK2/OFED 1.5.5)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_main.c