Michal Kalderon 390d3fdcae RDMA/core: Fix use after free and refcnt leak on ndev in_device in iwarp_query_port
If an iWARP driver is probed and removed while there are no ips set for
the device, it will lead to a reference count leak on the inet device of
the netdevice.

In addition, the netdevice was accessed after already calling netdev_put,
which could lead to using the netdev after already freed.

Fixes: 4929116bdf72 ("RDMA/core: Add common iWARP query port")
Link: https://lore.kernel.org/r/20190925123332.10746-1-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-10-01 11:31:27 -03:00
..
2019-08-20 13:27:53 -04:00
2019-05-03 10:56:56 -03:00
2019-06-28 21:18:23 -03:00
2018-12-12 07:40:16 -07:00
2016-03-03 10:20:25 -05:00
2019-04-25 12:27:11 -03:00
2018-12-12 07:40:16 -07:00
2016-03-03 10:20:25 -05:00
2019-09-21 10:26:24 -07:00
2019-09-21 10:26:24 -07:00
2019-09-21 10:26:24 -07:00
2019-06-28 21:18:23 -03:00
2019-06-28 21:18:23 -03:00
2019-04-25 12:27:11 -03:00