Jason Gunthorpe
a4e63bce14
RDMA/odp: Ensure the mm is still alive before creating an implicit child
...
Registration of a mmu_notifier requires the caller to hold a mmget() on
the mm as registration is not permitted to race with exit_mmap(). There is
a BUG_ON inside the mmu_notifier to guard against this.
Normally creating a umem is done against current which implicitly holds
the mmget(), however an implicit ODP child is created from a pagefault
work queue and is not guaranteed to have a mmget().
Call mmget() around this registration and abort faulting if the MM has
gone to exit_mmap().
Before the patch below the notifier was registered when the implicit ODP
parent was created, so there was no chance to register a notifier outside
of current.
Fixes: c571feca2d ("RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm'")
Link: https://lore.kernel.org/r/20200227114118.94736-1-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2020-03-04 13:56:07 -04:00
..
2020-02-11 23:26:15 +01:00
2020-01-29 18:53:37 -08:00
2020-02-06 06:11:50 +00:00
2020-01-28 16:02:33 -08:00
2020-02-08 14:04:19 -08:00
2020-01-28 16:02:33 -08:00
2020-02-08 13:26:41 -08:00
2020-01-24 19:57:53 +01:00
2020-02-15 10:33:19 -08:00
2020-01-03 09:42:52 +01:00
2020-02-16 13:05:46 -08:00
2020-02-08 14:17:27 -08:00
2020-02-08 14:17:27 -08:00
2020-02-14 10:40:48 +01:00
2020-02-08 14:04:19 -08:00
2020-01-28 16:02:33 -08:00
2020-01-16 09:52:27 -08:00
2020-01-16 19:14:49 +09:00
2020-02-08 13:58:44 -08:00
2020-01-03 11:43:44 +10:00
2020-02-13 13:29:41 +01:00
2020-01-06 09:45:59 +01:00
2020-02-08 14:04:19 -08:00
2020-01-10 12:51:56 -08:00
2020-02-10 13:54:17 +01:00
2020-02-14 13:04:46 +10:00
2020-01-30 08:04:01 -08:00
2020-02-03 14:42:03 +00:00
2020-02-12 12:43:01 -08:00
2020-01-21 16:16:36 -08:00
2020-01-14 15:38:28 +01:00
2020-02-07 12:54:13 -08:00
2020-01-13 10:00:05 +01:00
2020-02-04 03:05:26 +00:00
2020-02-03 11:57:18 +01:00
2020-02-04 07:17:41 +00:00
2020-03-04 13:56:07 -04:00
2020-02-15 16:49:25 -08:00
2020-01-07 09:30:09 +02:00
2020-02-05 17:49:54 +00:00
2020-01-06 09:45:59 +01:00
2020-02-09 15:47:37 -08:00
2020-02-04 03:05:26 +00:00
2020-01-22 21:08:24 +01:00
2020-02-04 13:06:46 +00:00
2020-01-08 10:41:52 +01:00
2020-02-16 12:35:52 -08:00
2020-02-04 07:17:41 +00:00
2020-01-16 10:45:44 -08:00
2020-01-19 22:10:04 +01:00
2020-02-04 07:17:41 +00:00
2020-02-07 12:54:13 -08:00
2020-01-27 13:03:00 -08:00
2020-02-04 03:05:27 +00:00
2020-02-14 07:05:17 -08:00
2020-01-19 22:10:04 +01:00
2020-01-31 10:30:37 -08:00
2020-02-16 12:35:52 -08:00
2020-02-07 12:54:13 -08:00
2020-02-08 14:04:19 -08:00
2020-01-27 13:03:00 -08:00
2020-01-13 13:19:38 -05:00
2020-02-04 03:05:26 +00:00
2020-02-06 14:17:38 +00:00
2020-02-10 18:14:46 +00:00
2020-02-04 03:05:27 +00:00
2020-02-04 03:05:24 +00:00
2020-02-04 07:24:48 +00:00
2020-02-04 03:05:26 +00:00
2020-02-08 13:55:25 -08:00
2020-01-13 10:32:19 +01:00
2020-01-19 22:10:04 +01:00
2020-01-20 15:40:49 +01:00
2020-02-03 14:51:57 +00:00
2020-01-24 09:34:07 -08:00
2020-01-10 22:20:37 -08:00
2020-01-20 10:29:56 -08:00
2020-02-04 07:17:41 +00:00
2020-02-11 20:14:28 +01:00
2020-02-08 17:24:41 -08:00
2020-01-06 09:45:59 +01:00
2020-01-14 21:46:53 +01:00
2020-01-14 21:46:48 +01:00
2020-02-11 15:00:15 -08:00
2020-01-16 17:34:38 +05:30
2020-02-04 03:05:27 +00:00
2020-02-10 13:16:04 +01:00
2020-01-06 09:45:59 +01:00
2020-02-04 03:05:26 +00:00
2020-01-29 18:16:16 -08:00
2020-01-31 11:28:31 -08:00
2020-02-08 14:04:19 -08:00
2020-01-31 14:39:21 -08:00
2020-01-14 15:37:41 +01:00
2020-02-09 16:05:50 -08:00
2020-01-14 15:27:51 +01:00
2020-02-08 13:26:41 -08:00
2020-02-03 22:22:05 +00:00
2020-02-09 16:05:50 -08:00
2020-02-06 03:40:27 -05:00
2020-01-14 15:30:35 +01:00
2020-01-29 10:35:54 -08:00
2020-01-29 10:35:54 -08:00
2020-02-07 12:30:16 -08:00
2020-02-05 17:44:14 +00:00
2020-02-09 16:05:50 -08:00