]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/siw: free siw_base_qp in kref release routine
authorKrishnamraju Eraparaju <krishna2@chelsio.com>
Mon, 7 Oct 2019 10:42:29 +0000 (16:12 +0530)
committerDoug Ledford <dledford@redhat.com>
Fri, 18 Oct 2019 18:49:01 +0000 (14:49 -0400)
commite17fa5c95ef2434a08e0be217969d246d037f0c2
tree200cde12253ffcef89d7ad315b62e6342b7781cd
parent54102dd410b037a4d7984e6a5826fb212c2f8aca
RDMA/siw: free siw_base_qp in kref release routine

As siw_free_qp() is the last routine to access 'siw_base_qp' structure,
freeing this structure early in siw_destroy_qp() could cause
touch-after-free issue.
Hence, moved kfree(siw_base_qp) from siw_destroy_qp() to siw_free_qp().

Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
Signed-off-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
Link: https://lore.kernel.org/r/20191007104229.29412-1-krishna2@chelsio.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/siw/siw_qp.c
drivers/infiniband/sw/siw/siw_verbs.c