IB/core: Fix use after free of ifa
authorMatan Barak <matanb@mellanox.com>
Thu, 15 Oct 2015 12:01:03 +0000 (15:01 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 20 Oct 2015 17:10:46 +0000 (13:10 -0400)
commit3909642034ffd7a8906ff3f2b2a71455bf39e7f6
tree6c8a84b1f0d965a5fcd8462e87eb112a4aff6a17
parent17b38fb89055bf5df402980c9546a8b046552f2b
IB/core: Fix use after free of ifa

When using ifup/ifdown while executing enum_netdev_ipv4_ips,
ifa could become invalid and cause use after free error.
Fixing it by protecting with RCU lock.

Fixes: 03db3a2d81e6 ('IB/core: Add RoCE GID table management')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/roce_gid_mgmt.c