]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iw_cxgb4: stop MPA_REPLY timer when disconnecting
authorSteve Wise <swise@opengridcomputing.com>
Fri, 29 Jul 2016 15:38:44 +0000 (08:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2016 08:12:48 +0000 (10:12 +0200)
commitc270b18bea75269388a7089b080840884c9d5d5c
tree12bb579368ff456fb47f289bbc6252259a24f826
parentbeaedc9689a0bb6940373624fcca36546aa66aa8
iw_cxgb4: stop MPA_REPLY timer when disconnecting

commit 12eb5137edecfd8fb6d23dacec2a3630e729736f upstream.

There exists a race where the application can setup a connection
and then disconnect it before iw_cxgb4 processes the fw4_ack
message.  For passive side connections, the fw4_ack message is
used to know when to stop the ep timer for MPA_REPLY messages.

If the application disconnects before the fw4_ack is handled then
c4iw_ep_disconnect() needs to clean up the timer state and stop the
timer before restarting it for the disconnect timer.  Failure to do this
results in a "timer already started" message and a premature stopping
of the disconnect timer.

Fixes: e4b76a2 ("RDMA/iw_cxgb4: stop_ep_timer() after MPA negotiation")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/cxgb4/cm.c