]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
IB/core: Fix deadlock on uverbs modify_qp error flow
authorMoshe Lazer <moshel@mellanox.com>
Thu, 5 Feb 2015 11:53:52 +0000 (13:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:31:32 +0000 (13:31 +0100)
commit5ed802de91567664a3f6bc37b8b03dfad8ad88ea
tree089512deeb46cc00835710d0182934656eca6dd9
parent374e23517787348543b907ff868e7d5e3318fa4f
IB/core: Fix deadlock on uverbs modify_qp error flow

commit 0fb8bcf022f19a375d7c4bd79ac513da8ae6d78b upstream.

The deadlock occurs in __uverbs_modify_qp: we take a lock (idr_read_qp)
and in case of failure in ib_resolve_eth_l2_attrs we don't release
it (put_qp_read).  Fix that.

Fixes: ed4c54e5b4ba ("IB/core: Resolve Ethernet L2 addresses when modifying QP")
Signed-off-by: Moshe Lazer <moshel@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/uverbs_cmd.c