]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: fix for a bug of lost refcnt in TCP_TIME_WAIT state.
authorEldad Zinger <eldadz@mellanox.co.il>
Sun, 6 Jun 2010 10:48:32 +0000 (13:48 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:59 +0000 (05:04 -0700)
OFED addons break semantics of cancel_delayed_work_sync(), like in SLES 10.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_main.c

index e46f1391afb8ddcf4bef5b8aabf51ed3fe1d67a7..f8a154b825294e24ab97091ddc50db01796666f2 100644 (file)
@@ -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)