]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Serialize access to the VMA list
authorMajd Dibbiny <majd@mellanox.com>
Sun, 24 Dec 2017 11:54:56 +0000 (13:54 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 27 Dec 2017 22:24:40 +0000 (15:24 -0700)
commit60ecc7d335c4a99a6b0fd26d3670a6b0e41afe53
tree6ae4f8fc84efe4a0db5750a696c24bc06dddbb09
parentb52f741e7ac70ad2b3e3eafa4b57313582e18232
IB/mlx5: Serialize access to the VMA list

User-space applications can do mmap and munmap directly at
any time.

Since the VMA list is not protected with a mutex, concurrent
accesses to the VMA list from the mmap and munmap can cause
data corruption. Add a mutex around the list.

Cc: <stable@vger.kernel.org> # v4.7
Fixes: bde8dfb5b5e7 ("IB/mlx5: Implements disassociate_ucontext API")
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h