From: Andy Grover Date: Tue, 16 Feb 2010 21:54:12 +0000 (-0800) Subject: RDS: Workaround for in-use MRs on close causing crash X-Git-Tag: v4.1.12-92~319^2^2~2^2~90 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=84bf9bd6cd6d59ed03b62a5d812929620d8d0f3f;p=users%2Fjedix%2Flinux-maple.git RDS: Workaround for in-use MRs on close causing crash if a machine is shut down without closing sockets properly, and freeing all MRs, then a BUG_ON will bring it down. This patch changes these to WARN_ONs -- leaking MRs is not fatal (although not ideal, and there is more work to do here for a proper fix.) Signed-off-by: Andy Grover --- diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index c5e916598c14..0ae87ecb850c 100644 --- a/net/rds/ib_rdma.c +++ b/net/rds/ib_rdma.c @@ -234,8 +234,8 @@ void rds_ib_destroy_mr_pool(struct rds_ib_mr_pool *pool) { flush_workqueue(rds_wq); rds_ib_flush_mr_pool(pool, 1); - BUG_ON(atomic_read(&pool->item_count)); - BUG_ON(atomic_read(&pool->free_pinned)); + WARN_ON(atomic_read(&pool->item_count)); + WARN_ON(atomic_read(&pool->free_pinned)); kfree(pool); }