Skip to content

Commit

Permalink
riscv: use vma iterator for vdso
Browse files Browse the repository at this point in the history
Remove the linked list use in favour of the vma iterator.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
howlett authored and xanmod committed Oct 3, 2022
1 parent 65eddff commit 7e973ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/riscv/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
{
struct mm_struct *mm = task->mm;
struct vm_area_struct *vma;
VMA_ITERATOR(vmi, mm, 0);
struct __vdso_info *vdso_info = mm->context.vdso_info;

mmap_read_lock(mm);

for (vma = mm->mmap; vma; vma = vma->vm_next) {
for_each_vma(vmi, vma) {
unsigned long size = vma->vm_end - vma->vm_start;

if (vma_is_special_mapping(vma, vdso_info->dm))
Expand Down

0 comments on commit 7e973ae

Please sign in to comment.