Re: [PATCH] IB/srp: Fix a debug kernel crash

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

 




On 4/13/2016 12:39 AM, Bart Van Assche wrote:
Avoid that the following BUG() is triggered against a debug
kernel:


Looks good.
Reviewed-by: Max Gurtovoy <maxg@xxxxxxxxxxxx>


diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 7672b19..30c3dfc 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1503,7 +1503,7 @@ static int srp_map_idb(struct srp_rdma_ch *ch, struct srp_request *req,

  	if (dev->use_fast_reg) {
  		state.sg = idb_sg;
-		sg_set_buf(idb_sg, req->indirect_desc, idb_len);
+		sg_init_one(idb_sg, req->indirect_desc, idb_len);
  		idb_sg->dma_address = req->indirect_dma_addr; /* hack! */
  #ifdef CONFIG_NEED_SG_DMA_LENGTH
  		idb_sg->dma_length = idb_sg->length;	      /* hack^2 */

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux