From: Eldad Zinger Date: Sun, 6 Jun 2010 10:48:32 +0000 (+0300) Subject: sdp: fix for a bug of lost refcnt in TCP_TIME_WAIT state. X-Git-Tag: v4.1.12-92~264^2~5^2~178 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5495fc23eb432999e4c213a606fe4104243a2fed;p=users%2Fjedix%2Flinux-maple.git sdp: fix for a bug of lost refcnt in TCP_TIME_WAIT state. OFED addons break semantics of cancel_delayed_work_sync(), like in SLES 10. Signed-off-by: Eldad Zinger --- diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index e46f1391afb8d..f8a154b825294 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -614,7 +614,11 @@ static int sdp_cancel_cma_timewait_timeout(struct sdp_sock *ssk) return 1; ssk->cma_timewait_timeout = 0; - return cancel_delayed_work_sync(&ssk->cma_timewait_work); + return cancel_delayed_work(&ssk->cma_timewait_work); + /* No need to use the sync'ed function because the socket's refcnt is + * pre-taken and multiple invocations of sock_put() are self sync'ed + * (atomic operation). + */ } static inline void sdp_start_cma_timewait_timeout(struct sdp_sock *ssk, int timeo)