]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: protect sdp_auto_moderation from device removal
authorAmir Vadai <amirv@mellanox.co.il>
Tue, 15 Jun 2010 13:00:15 +0000 (16:00 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:03 +0000 (05:05 -0700)
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_main.c

index a631a2517ba49e2a1a138b07536951b0579cf7cb..6974bee7ddb49531e1310248b1240d1a0c9e2c98 100644 (file)
@@ -363,6 +363,9 @@ static void sdp_auto_moderation(struct sdp_sock *ssk)
        int moder_time;
        int err;
 
+       if (unlikely(!ssk->rx_ring.cq))
+               return;
+
        if (!mod->adaptive_rx_coal)
                return;