infiniband: fix race condition between infiniband mlx4, mlx5 driver and core dumping
authorAjay Kaher <akaher@vmware.com>
Mon, 10 Jun 2019 20:52:17 +0000 (02:22 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:16:19 +0000 (08:16 +0200)
commit7ab0cb70c2d2c7615b2b489d55e850cdae5400ef
tree0bf2d0dba739290b45818563bb92c76637ab49d0
parentdc30d2ceebe1d51d2d4a1bd3989289b9093505a5
infiniband: fix race condition between infiniband mlx4, mlx5 driver and core dumping

This patch is the extension of following upstream commit to fix
the race condition between get_task_mm() and core dumping
for IB->mlx4 and IB->mlx5 drivers:

commit 04f5866e41fb ("coredump: fix race condition between
mmget_not_zero()/get_task_mm() and core dumping")'

Thanks to Jason for pointing this.

Signed-off-by: Ajay Kaher <akaher@vmware.com>
Acked-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c