[bug report] svcrdma: Allocate recv_ctxt's on CPU handling Receives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Chuck Lever,

The patch 0b2613c5883f: "svcrdma: Allocate recv_ctxt's on CPU
handling Receives" from May 7, 2018, leads to the following static
checker warning:

	net/sunrpc/xprtrdma/svc_rdma_recvfrom.c:273 svc_rdma_post_recvs()
	warn: signedness bug returning '(-12)'

net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
   258  /**
   259   * svc_rdma_post_recvs - Post initial set of Recv WRs
   260   * @rdma: fresh svcxprt_rdma
   261   *
   262   * Returns true if successful, otherwise false.
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   263   */
   264  bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma)
   265  {
   266          struct svc_rdma_recv_ctxt *ctxt;
   267          unsigned int i;
   268          int ret;
   269  
   270          for (i = 0; i < rdma->sc_max_requests; i++) {
   271                  ctxt = svc_rdma_recv_ctxt_get(rdma);
   272                  if (!ctxt)
   273                          return -ENOMEM;
                                ^^^^^^^^^^^^^^^
   274                  ctxt->rc_temp = true;
   275                  ret = __svc_rdma_post_recv(rdma, ctxt);
   276                  if (ret) {
   277                          pr_err("svcrdma: failure posting recv buffers: %d\n",
   278                                 ret);
   279                          return false;
   280                  }
   281          }
   282          return true;
   283  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux