Commit 468f6597 authored by Richard Weinberger's avatar Richard Weinberger

um: Fix hung task in fix_range_common()

If do_ops() fails we have to release current->mm->mmap_sem
otherwise the failing task will never terminate.
Reported-by: default avatarToralf Förster <toralf.foerster@gmx.de>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 284e6d39
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <mem_user.h> #include <mem_user.h>
#include <os.h> #include <os.h>
#include <skas.h> #include <skas.h>
#include <kern_util.h>
struct host_vm_change { struct host_vm_change {
struct host_vm_op { struct host_vm_op {
...@@ -286,8 +287,11 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, ...@@ -286,8 +287,11 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
/* This is not an else because ret is modified above */ /* This is not an else because ret is modified above */
if (ret) { if (ret) {
printk(KERN_ERR "fix_range_common: failed, killing current " printk(KERN_ERR "fix_range_common: failed, killing current "
"process\n"); "process: %d\n", task_tgid_vnr(current));
/* We are under mmap_sem, release it such that current can terminate */
up_write(&current->mm->mmap_sem);
force_sig(SIGKILL, current); force_sig(SIGKILL, current);
do_signal();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment