Re: [PATCH stable 4.4 v2] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-10 Thread Jason Gunthorpe
On Mon, Jun 10, 2019 at 03:58:23PM +0200, Michal Hocko wrote: > Just a heads up. Ajay Kaher has noticed that mlx4 driver is missing the > check in 4.14 [1] and 4.4 seems to have the same problem. I will wait > for more review before reposting v3. The incremental diff is: > > diff --git a/drivers/i

Re: [PATCH stable 4.4 v2] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-10 Thread Michal Hocko
Just a heads up. Ajay Kaher has noticed that mlx4 driver is missing the check in 4.14 [1] and 4.4 seems to have the same problem. I will wait for more review before reposting v3. The incremental diff is: diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 67c4

[PATCH stable 4.4 v2] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-10 Thread Michal Hocko
From: Andrea Arcangeli Upstream 04f5866e41fb70690e28397487d8bd8eea7d712a commit. The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization o