Re: [syzbot] [rdma?] WARNING in res_to_rt

Zhu Yanjun <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index cc24fddf9aaa..35e463a20ade 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3531,7 +3531,8 @@ static void addr_handler(int status, struct 
sockaddr *src_addr,
                 if (status)
                         pr_debug_ratelimited("RDMA CM: ADDR_ERROR: 
failed to acquire device. status %d\n",
                                              status);
-               rdma_restrack_add(&id_priv->res);
+               if (id_priv->id.device)
+                       rdma_restrack_add(&id_priv->res);
         } else if (status) {
                 pr_debug_ratelimited("RDMA CM: ADDR_ERROR: failed to 
resolve IP. status %d\n", status);
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.