mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] srp: fix fmr error handling
@ 2006-07-10 19:38 Michael S. Tsirkin
  2006-07-10 22:10 ` [PATCH fixed] " Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2006-07-10 19:38 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Andrew Morton
  Cc: Sean Hefty, Roland Dreier, openib-general, linux-kernel, netdev

Andrew, could you pls drop the following in -mm and on to Linus?

---

 From: Vu Pham <vu@mellanox.com>

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 <vu@mellanox.com>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Acked-by: Roland Dreier <rolandd@cisco.com>

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 4e22afe..8f472e7 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -615,9 +615,10 @@ static int srp_map_fmr(struct srp_device
 				(sg_dma_address(&scat[i]) & dev->fmr_page_mask) + j;
 
 	req->fmr = ib_fmr_pool_map_phys(dev->fmr_pool,
					dma_pages, page_cnt, &io_addr);
 	if (IS_ERR(req->fmr)) {
 		ret = PTR_ERR(req->fmr);
+		req->fmr = NULL;
 		goto out;
 	}
 

-- 
MST

----- End forwarded message -----

-- 
MST

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-10 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-10 19:38 [PATCH] srp: fix fmr error handling Michael S. Tsirkin
2006-07-10 22:10 ` [PATCH fixed] " Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®