[PATCH] nvmet-rdma: Fix missing dma sync to nvme data structures
Christoph Hellwig
hch at lst.de
Mon Jan 16 07:31:09 PST 2017
> +++ b/drivers/nvme/target/rdma.c
> @@ -438,6 +438,14 @@ static int nvmet_rdma_post_recv(struct nvmet_rdma_device *ndev,
> {
> struct ib_recv_wr *bad_wr;
>
> + ib_dma_sync_single_for_device(ndev->device,
> + cmd->sge[0].addr, sizeof(*cmd->nvme_cmd),
> + DMA_FROM_DEVICE);
> +
> + if (cmd->sge[1].addr)
0 can be a valid address returned from dma_map_single on some
architectures.
More information about the Linux-nvme
mailing list