]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: before activating rx_ring timer, need to check that qp is still active.
authorEldad Zinger <eldadz@mellanox.co.il>
Wed, 14 Jul 2010 08:20:19 +0000 (11:20 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:12 +0000 (05:05 -0700)
Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h

index 70f67f1fce74e011a7d3d7d9d15ccae71742a682..8ab07cd12ee332457ce696d87a08c055e5d26b9d 100644 (file)
@@ -98,13 +98,15 @@ struct sdp_skb_cb {
                atomic_inc(&ssk->somebody_is_doing_posts);              \
                /* postpone the rx_ring.timer, there is no need to enable
                 * interrupts because there will be cq-polling. */      \
-               mod_timer(&ssk->rx_ring.timer, MAX_JIFFY_OFFSET);       \
+               if (likely(ssk->qp_active))                             \
+                       mod_timer(&ssk->rx_ring.timer, MAX_JIFFY_OFFSET); \
        } while (0)
 
 #define posts_handler_put(ssk, intr_delay)                             \
        do {                                                            \
                sdp_do_posts(ssk);                                      \
-               if (atomic_dec_and_test(&ssk->somebody_is_doing_posts)) { \
+               if (atomic_dec_and_test(&ssk->somebody_is_doing_posts) && \
+                       likely(ssk->qp_active)) {                       \
                        if (intr_delay)                                 \
                                mod_timer(&ssk->rx_ring.timer, intr_delay); \
                        else                                            \