rrpc has assumed that medatada is always sent as a dma buffer to the device. When this is not true, do not attempt to free a non-allocated dma region. Signed-off-by: Javier González <javier@xxxxxxxxxxxx> --- drivers/lightnvm/rrpc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index a9a5fcc..ba789c3 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -707,10 +707,12 @@ static void rrpc_end_io(struct nvm_rq *rqd) rrpc_unlock_rq(rrpc, rqd); - if (npages > 1) + if (npages > 1) { nvm_dev_dma_free(rrpc->dev, rqd->ppa_list, rqd->dma_ppa_list); - if (rqd->metadata) - nvm_dev_dma_free(rrpc->dev, rqd->metadata, rqd->dma_metadata); + if (rqd->meta_list) + nvm_dev_dma_free(rrpc->dev, rqd->meta_list, + rqd->dma_meta_list); + } mempool_free(rqd, rrpc->rq_pool); } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html