projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f122886
)
RDMA/i40w: Hold read semaphore while looking after VMA
author
Leon Romanovsky
<leonro@mellanox.com>
Sun, 1 Jul 2018 16:36:24 +0000
(19:36 +0300)
committer
Jason Gunthorpe
<jgg@mellanox.com>
Wed, 4 Jul 2018 17:51:06 +0000
(11:51 -0600)
VMA lookup is supposed to be performed while mmap_sem is held.
Fixes: f26c7c83395b ("i40iw: Add 2MB page support")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/i40iw/i40iw_verbs.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index 8884ff71a63468aceb78ee8774752f2a5cf3283c..7d85414742ff6a3f4f375ae9d57b8cf8ba2ccbdf 100644
(file)
--- a/
drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/
drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@
-1410,6
+1410,7
@@
static void i40iw_set_hugetlb_values(u64 addr, struct i40iw_mr *iwmr)
struct vm_area_struct *vma;
struct hstate *h;
+ down_read(¤t->mm->mmap_sem);
vma = find_vma(current->mm, addr);
if (vma && is_vm_hugetlb_page(vma)) {
h = hstate_vma(vma);
@@
-1418,6
+1419,7
@@
static void i40iw_set_hugetlb_values(u64 addr, struct i40iw_mr *iwmr)
iwmr->page_msk = huge_page_mask(h);
}
}
+ up_read(¤t->mm->mmap_sem);
}
/**