Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <vu@mellanox.com>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Vu Pham and committed by
Linus Torvalds
6583eb3d f0ee3404

+1
+1
drivers/infiniband/ulp/srp/ib_srp.c
··· 618 618 dma_pages, page_cnt, &io_addr); 619 619 if (IS_ERR(req->fmr)) { 620 620 ret = PTR_ERR(req->fmr); 621 + req->fmr = NULL; 621 622 goto out; 622 623 } 623 624