IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Mon, 11 Jun 2018 18:15:11 +0000 (20:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:08:56 +0000 (13:08 +0200)
commitda327a4b9d096a0734fc345ea96b483feafd0b4b
treed7f6416fb877949a6d6bedcc7ca32a7fbe541552
parent048f62f3725d30467d57b9a76e93a19c01af56b2
IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()'

[ Upstream commit 3dc7c7badb7502ec3e3aa817a8bdd9e53aa54c52 ]

Before returning -EPERM we should release some resources, as already done
in the other error handling path of the function.

Fixes: d8f9cc328c88 ("IB/mlx4: Mark user MR as writable if actual virtual memory is writable")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx4/mr.c