RDMA/iwcm: Fix memory leak
authorKrishna Kumar <krkumar2@in.ibm.com>
Thu, 9 Nov 2006 04:00:41 +0000 (09:30 +0530)
committerRoland Dreier <rolandd@cisco.com>
Wed, 29 Nov 2006 23:33:07 +0000 (15:33 -0800)
commit83b96586239bf6c719ff640341e1cf83e4a7c046
treefafbfdbc713e45e2972c27795444af3d62db39c5
parent33ba0fa9f315ce32fbb86fa671c131f5355b52a1
RDMA/iwcm: Fix memory leak

If we get IW_CM_EVENT_CONNECT_REQUEST message and encounter an error
(not in the LISTEN state, cannot create an id, cannot alloc
work_entry, etc), then the memory allocated by cm_event_handler() in
the event->private_data gets leaked. Since cm_work_handler has already
put the event on the work_free_list, this allocated memory is
leaked. High backlog value can allow DoS attacks.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/iwcm.c