]> git.baikalelectronics.ru Git - kernel.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)
committerRoland Dreier <roland@purestorage.com>
Wed, 18 Feb 2015 06:06:42 +0000 (22:06 -0800)
commit2aec6d6b419a7efe1700e1bb39dc39ca304ffd11
tree93ae49f2d4030a880055fd2392119fec22068dfb
parentb0c77e114c00b2a202efde9b512c1175708e4284
IB/core: Fix deadlock on uverbs modify_qp error flow

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: cbd8aba2ac79 ("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>
drivers/infiniband/core/uverbs_cmd.c