From: Vu Pham Date: Fri, 14 Jul 2006 07:23:53 +0000 (-0700) Subject: [PATCH] srp: fix fmr error handling X-Git-Tag: v2.6.18-rc2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6583eb3dcc1f03ce969594dae5573dbefce015dc;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [PATCH] srp: fix fmr error handling srp_unmap_data assumes req->fmr is NULL if the request is not mapped, so we must clean it out in case of an error. Signed-off-by: Vu Pham Signed-off-by: Michael S. Tsirkin Acked-by: Roland Dreier Cc: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 4e22afe..6191180 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -618,6 +618,7 @@ static int srp_map_fmr(struct srp_device *dev, struct scatterlist *scat, dma_pages, page_cnt, &io_addr); if (IS_ERR(req->fmr)) { ret = PTR_ERR(req->fmr); + req->fmr = NULL; goto out; }