projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: Mute warning for __builtin_return_address(>0) for tracing only
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
sys.c
diff --git
a/kernel/sys.c
b/kernel/sys.c
index 6af9212ab5aab7cef491eb4e40e7c9277c1f2ac0..78947de6f9691e898adf3803ec59fded4a0a28da 100644
(file)
--- a/
kernel/sys.c
+++ b/
kernel/sys.c
@@
-1853,11
+1853,13
@@
static int prctl_set_mm_map(int opt, const void __user *addr, unsigned long data
user_auxv[AT_VECTOR_SIZE - 1] = AT_NULL;
}
user_auxv[AT_VECTOR_SIZE - 1] = AT_NULL;
}
- if (prctl_map.exe_fd != (u32)-1)
+ if (prctl_map.exe_fd != (u32)-1)
{
error = prctl_set_mm_exe_file(mm, prctl_map.exe_fd);
error = prctl_set_mm_exe_file(mm, prctl_map.exe_fd);
- down_read(&mm->mmap_sem);
- if (error)
- goto out;
+ if (error)
+ return error;
+ }
+
+ down_write(&mm->mmap_sem);
/*
* We don't validate if these members are pointing to
/*
* We don't validate if these members are pointing to
@@
-1894,10
+1896,8
@@
static int prctl_set_mm_map(int opt, const void __user *addr, unsigned long data
if (prctl_map.auxv_size)
memcpy(mm->saved_auxv, user_auxv, sizeof(user_auxv));
if (prctl_map.auxv_size)
memcpy(mm->saved_auxv, user_auxv, sizeof(user_auxv));
- error = 0;
-out:
- up_read(&mm->mmap_sem);
- return error;
+ up_write(&mm->mmap_sem);
+ return 0;
}
#endif /* CONFIG_CHECKPOINT_RESTORE */
}
#endif /* CONFIG_CHECKPOINT_RESTORE */
@@
-1963,7
+1963,7
@@
static int prctl_set_mm(int opt, unsigned long addr,
error = -EINVAL;
error = -EINVAL;
- down_
read
(&mm->mmap_sem);
+ down_
write
(&mm->mmap_sem);
vma = find_vma(mm, addr);
prctl_map.start_code = mm->start_code;
vma = find_vma(mm, addr);
prctl_map.start_code = mm->start_code;
@@
-2056,7
+2056,7
@@
static int prctl_set_mm(int opt, unsigned long addr,
error = 0;
out:
error = 0;
out:
- up_
read
(&mm->mmap_sem);
+ up_
write
(&mm->mmap_sem);
return error;
}
return error;
}