search for: mmput

Displaying 20 results from an estimated 188 matches for "mmput".

2020 Apr 16
0
[PATCH 2/3] kernel: better document the use_mm/unuse_mm API contract
...>mm); + kthread_use_mm(kvm->mm); } idx = srcu_read_lock(&kvm->srcu); @@ -2057,7 +2057,7 @@ static int kvmgt_rw_gpa(unsigned long handle, unsigned long gpa, srcu_read_unlock(&kvm->srcu, idx); if (kthread) { - unuse_mm(kvm->mm); + kthread_unuse_mm(kvm->mm); mmput(kvm->mm); } diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index c57b1b2507c6..d9e48bd7c692 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -827,9 +827,9 @@ static void ffs_user_copy_worker(struct work_struct *...
2020 Apr 04
0
[PATCH 5/6] kernel: better document the use_mm/unuse_mm API contract
...>mm); + kthread_use_mm(kvm->mm); } idx = srcu_read_lock(&kvm->srcu); @@ -2057,7 +2057,7 @@ static int kvmgt_rw_gpa(unsigned long handle, unsigned long gpa, srcu_read_unlock(&kvm->srcu, idx); if (kthread) { - unuse_mm(kvm->mm); + kthread_unuse_mm(kvm->mm); mmput(kvm->mm); } diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index c57b1b2507c6..d9e48bd7c692 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -827,9 +827,9 @@ static void ffs_user_copy_worker(struct work_struct *...
2008 Jul 26
5
BUG: soft lockup - CPU#1 stuck for 61s!
...fter two days. The machines crashed and the syslog said it got the following messages: ------------------ part dump of /var/log/messages ---------------------- ..... Jul 25 02:15:02 vega2008 kernel: [<c045bc58>] ? exit_mmap+0x93/0xc9 Jul 25 02:15:02 vega2008 kernel: [<c04214c2>] ? mmput+0x25/0x68 Jul 25 02:15:02 vega2008 kernel: [<c046e9c9>] ? flush_old_exec+0x4f8/0x777 Jul 25 02:15:02 vega2008 kernel: [<c046dfcf>] ? kernel_read+0x32/0x43 Jul 25 02:15:02 vega2008 kernel: [<c0490e60>] ? load_elf_binary+0x359/0x1152 Jul 25 02:15:02 vega2008 kernel: [<c045a6e...
2020 Apr 04
0
[PATCH 6/6] kernel: set USER_DS in kthread_use_mm
...index 83c2868eff2a..75cc2f31816d 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -168,7 +168,6 @@ static bool __io_worker_unuse(struct io_wqe *wqe, struct io_worker *worker) dropped_lock = true; } __set_current_state(TASK_RUNNING); - set_fs(KERNEL_DS); kthread_unuse_mm(worker->mm); mmput(worker->mm); worker->mm = NULL; @@ -420,14 +419,11 @@ static void io_wq_switch_mm(struct io_worker *worker, struct io_wq_work *work) mmput(worker->mm); worker->mm = NULL; } - if (!work->mm) { - set_fs(KERNEL_DS); + if (!work->mm) return; - } + if (mmget_not_zero(w...
2020 Apr 16
0
[PATCH 3/3] kernel: set USER_DS in kthread_use_mm
...index 748621f7391e..a5e90ac39e4d 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -169,7 +169,6 @@ static bool __io_worker_unuse(struct io_wqe *wqe, struct io_worker *worker) dropped_lock = true; } __set_current_state(TASK_RUNNING); - set_fs(KERNEL_DS); kthread_unuse_mm(worker->mm); mmput(worker->mm); worker->mm = NULL; @@ -421,14 +420,11 @@ static void io_wq_switch_mm(struct io_worker *worker, struct io_wq_work *work) mmput(worker->mm); worker->mm = NULL; } - if (!work->mm) { - set_fs(KERNEL_DS); + if (!work->mm) return; - } + if (mmget_not_zero(w...
2020 Jun 19
0
[PATCH 08/16] nouveau/hmm: fault one page at a time
...n the + * fault window, determining required pages and access + * permissions based on pending faults. */ - mmap_read_lock(mm); - vma = find_vma_intersection(mm, start, limit); - if (!vma) { - SVMM_ERR(svmm, "wndw %016llx-%016llx", start, limit); - mmap_read_unlock(mm); - mmput(mm); - nouveau_svm_fault_cancel_fault(svm, buffer->fault[fi]); - continue; + args.i.p.addr = start; + args.i.p.page = PAGE_SHIFT; + args.i.p.size = PAGE_SIZE; + /* + * Determine required permissions based on GPU fault + * access flags. + * XXX: atomic? + */ + switch (buffer->...
2020 Jul 01
0
[PATCH v3 1/5] nouveau/hmm: fault one page at a time
...n the + * fault window, determining required pages and access + * permissions based on pending faults. */ - mmap_read_lock(mm); - vma = find_vma_intersection(mm, start, limit); - if (!vma) { - SVMM_ERR(svmm, "wndw %016llx-%016llx", start, limit); - mmap_read_unlock(mm); - mmput(mm); - nouveau_svm_fault_cancel_fault(svm, buffer->fault[fi]); - continue; + args.i.p.addr = start; + args.i.p.page = PAGE_SHIFT; + args.i.p.size = PAGE_SIZE; + /* + * Determine required permissions based on GPU fault + * access flags. + * XXX: atomic? + */ + switch (buffer->...
2014 Oct 13
2
kernel crashes after soft lockups in xen domU
...78b>] ? free_pages_and_swap_cache+0x48/0x60 [354008.101045] [<ffffffff810cf527>] ? tlb_flush_mmu+0x37/0x50 [354008.101049] [<ffffffff810cf54c>] ? tlb_finish_mmu+0xc/0x31 [354008.101054] [<ffffffff810d5e79>] ? exit_mmap+0xc4/0xe9 [354008.101060] [<ffffffff81044b82>] ? mmput+0x56/0xf8 [354008.101064] [<ffffffff81049d07>] ? exit_mm+0x117/0x122 [354008.101069] [<ffffffff8107115b>] ? arch_local_irq_disable+0x7/0x8 [354008.101074] [<ffffffff81350487>] ? _raw_spin_lock_irq+0xa/0x14 [354008.101078] [<ffffffff8107115b>] ? arch_local_irq_disable+0x7...
2012 Nov 16
5
[ 3009.778974] mcelog:16842 map pfn expected mapping type write-back for [mem 0x0009f000-0x000a0fff], got uncached-minus
...[<ffffffff8111a59b>] unmap_single_vma+0x86b/0x8e0 [ 3009.885895] [<ffffffff81100f16>] ? release_pages+0x196/0x1f0 [ 3009.895488] [<ffffffff8111a65c>] unmap_vmas+0x4c/0xa0 [ 3009.905134] [<ffffffff8111c8fa>] exit_mmap+0x9a/0x180 [ 3009.914706] [<ffffffff81064e72>] mmput+0x52/0xd0 [ 3009.924252] [<ffffffff810652b7>] dup_mm+0x3c7/0x510 [ 3009.933839] [<ffffffff81065fd5>] copy_process+0xac5/0x14a0 [ 3009.943430] [<ffffffff81066af3>] do_fork+0x53/0x360 [ 3009.952843] [<ffffffff810b25c7>] ? lock_release+0x117/0x250 [ 3009.962283] [<fffff...
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2020 Apr 16
8
improve use_mm / unuse_mm v2
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. Changes since v1: - drop a few patches - fix a comment typo - cover the newly merged use_mm/unuse_mm caller in vfio
2020 Apr 16
8
improve use_mm / unuse_mm v2
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. Changes since v1: - drop a few patches - fix a comment typo - cover the newly merged use_mm/unuse_mm caller in vfio
2019 Oct 29
2
[PATCH v2 12/15] drm/amdgpu: Call find_vma under mmap_sem
...r = -EPERM; > + goto out_unlock; > + } > + > r = hmm_range_fault(range, 0); > up_read(&mm->mmap_sem); > > @@ -865,15 +866,19 @@ int amdgpu_ttm_tt_get_user_pages(struct amdgpu_bo *bo, struct page **pages) > } > > gtt->range = range; > + mmput(mm); > > return 0; > > +out_unlock: > + up_read(&mm->mmap_sem); > out_free_pfns: > hmm_range_unregister(range); > kvfree(pfns); > out_free_ranges: > kfree(range); > out: > + mmput(mm); > return r; > } >
2019 Oct 17
0
[PATCH RFC 3/3] vhost, kcov: collect coverage from vhost_worker
...andle = current->kcov_handle; > +#endif > worker = kthread_create(vhost_worker, dev, "vhost-%d", current->pid); > if (IS_ERR(worker)) { > err = PTR_ERR(worker); > @@ -571,6 +580,9 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > if (dev->mm) > mmput(dev->mm); > dev->mm = NULL; > +#ifdef CONFIG_KCOV > + dev->kcov_handle = 0; > +#endif > err_mm: > return err; > } > @@ -682,6 +694,9 @@ void vhost_dev_cleanup(struct vhost_dev *dev) > if (dev->worker) { > kthread_stop(dev->worker); > dev...
2019 Oct 23
0
[PATCH 3/3] vhost, kcov: collect coverage from vhost_worker
...> worker = kthread_create(vhost_worker, dev, "vhost-%d", current->pid); > if (IS_ERR(worker)) { > err = PTR_ERR(worker); > @@ -571,6 +575,7 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > if (dev->mm) > mmput(dev->mm); > dev->mm = NULL; > + dev->kcov_handle = 0; > err_mm: > return err; > } > @@ -682,6 +687,7 @@ void vhost_dev_cleanup(struct vhost_dev *dev) > if (dev->worker) { > kthread_stop(dev->worker); >...
2014 Nov 05
0
kernel crashes after soft lockups in xen domU
...es_and_swap_cache+0x48/0x60 > [354008.101045] [<ffffffff810cf527>] ? tlb_flush_mmu+0x37/0x50 > [354008.101049] [<ffffffff810cf54c>] ? tlb_finish_mmu+0xc/0x31 > [354008.101054] [<ffffffff810d5e79>] ? exit_mmap+0xc4/0xe9 > [354008.101060] [<ffffffff81044b82>] ? mmput+0x56/0xf8 > [354008.101064] [<ffffffff81049d07>] ? exit_mm+0x117/0x122 > [354008.101069] [<ffffffff8107115b>] ? arch_local_irq_disable+0x7/0x8 > [354008.101074] [<ffffffff81350487>] ? _raw_spin_lock_irq+0xa/0x14 > [354008.101078] [<ffffffff8107115b>] ? arch_l...
2011 May 19
1
Centos 5.6 kernel errors
...: [<c0105abb>] show_registers+0x1ab/0x240 14857 kernel: [<c0105dc1>] die+0x111/0x240 14857 kernel: [<c01130a7>] do_page_fault+0x5f7/0x931 14857 kernel: [<c01052ab>] error_code+0x2b/0x30 14857 kernel: [<c011bd9b>] __mmdrop+0x1b/0x50 14857 kernel: [<c011be50>] mmput+0x80/0xa0 14857 kernel: [<c0170a8a>] flush_old_exec+0x1ba/0xb30 14857 kernel: [<c0191e1f>] load_elf_binary+0x26f/0x1780 14857 kernel: [<c0171602>] search_binary_handler+0x92/0x240 14857 kernel: [<c0171923>] do_execve+0x173/0x215 14857 kernel: [<c0103892>] sys_exec...
2019 Oct 28
0
[PATCH v2 12/15] drm/amdgpu: Call find_vma under mmap_sem
...GPU_GEM_USERPTR_ANONONLY) && + vma->vm_file)) { + r = -EPERM; + goto out_unlock; + } + r = hmm_range_fault(range, 0); up_read(&mm->mmap_sem); @@ -865,15 +866,19 @@ int amdgpu_ttm_tt_get_user_pages(struct amdgpu_bo *bo, struct page **pages) } gtt->range = range; + mmput(mm); return 0; +out_unlock: + up_read(&mm->mmap_sem); out_free_pfns: hmm_range_unregister(range); kvfree(pfns); out_free_ranges: kfree(range); out: + mmput(mm); return r; } -- 2.23.0
2019 Oct 23
0
[PATCH 3/3] vhost, kcov: collect coverage from vhost_worker
...r, dev, "vhost-%d", current->pid); > > > if (IS_ERR(worker)) { > > > err = PTR_ERR(worker); > > > @@ -571,6 +575,7 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > > > if (dev->mm) > > > mmput(dev->mm); > > > dev->mm = NULL; > > > + dev->kcov_handle = 0; > > > err_mm: > > > return err; > > > } > > > @@ -682,6 +687,7 @@ void vhost_dev_cleanup(struct vhost_dev *dev) > > > if (dev->wor...