linux/drivers/infiniband
Doron Tsur 69a7ca0604 IB/cm: Fix rb-tree duplicate free and use-after-free
[ Upstream commit 0ca81a2840 ]

ib_send_cm_sidr_rep could sometimes erase the node from the sidr
(depending on errors in the process). Since ib_send_cm_sidr_rep is
called both from cm_sidr_req_handler and cm_destroy_id, cm_id_priv
could be either erased from the rb_tree twice or not erased at all.
Fixing that by making sure it's erased only once before freeing
cm_id_priv.

Fixes: a977049dac ('[PATCH] IB: Add the kernel CM implementation')
Signed-off-by: Doron Tsur <doront@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-11-15 12:51:53 -05:00
..
core IB/cm: Fix rb-tree duplicate free and use-after-free 2015-11-15 12:51:53 -05:00
hw IB/mlx4: Use correct SL on AH query under RoCE 2015-10-07 10:23:10 -04:00
ulp iser-target: remove command with state ISTATE_REMOVE 2015-10-27 22:12:54 -04:00
Kconfig Merge branch 'ip-roce' into for-next 2014-01-22 23:24:21 -08:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00