projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull sn-handle-sc-powerdown into release branch
[powerpc.git]
/
fs
/
exec.c
diff --git
a/fs/exec.c
b/fs/exec.c
index
22533cc
..
0b515ac
100644
(file)
--- a/
fs/exec.c
+++ b/
fs/exec.c
@@
-324,7
+324,7
@@
void install_arg_page(struct vm_area_struct *vma,
lru_cache_add_active(page);
set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte(
page, vma->vm_page_prot))));
lru_cache_add_active(page);
set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte(
page, vma->vm_page_prot))));
- page_add_anon_rmap(page, vma, address);
+ page_add_
new_
anon_rmap(page, vma, address);
pte_unmap_unlock(pte, ptl);
/* no need for flush_tlb */
pte_unmap_unlock(pte, ptl);
/* no need for flush_tlb */
@@
-477,7
+477,7
@@
struct file *open_exec(const char *name)
int err;
struct file *file;
int err;
struct file *file;
- err = path_lookup_open(name, LOOKUP_FOLLOW, &nd, FMODE_READ);
+ err = path_lookup_open(
AT_FDCWD,
name, LOOKUP_FOLLOW, &nd, FMODE_READ);
file = ERR_PTR(err);
if (!err) {
file = ERR_PTR(err);
if (!err) {
@@
-575,7
+575,7
@@
static int exec_mmap(struct mm_struct *mm)
* disturbing other processes. (Other processes might share the signal
* table via the CLONE_SIGHAND option to clone().)
*/
* disturbing other processes. (Other processes might share the signal
* table via the CLONE_SIGHAND option to clone().)
*/
-static in
line in
t de_thread(struct task_struct *tsk)
+static int de_thread(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
struct sighand_struct *newsighand, *oldsighand = tsk->sighand;
{
struct signal_struct *sig = tsk->signal;
struct sighand_struct *newsighand, *oldsighand = tsk->sighand;
@@
-632,10
+632,10
@@
static inline int de_thread(struct task_struct *tsk)
* synchronize with any firing (by calling del_timer_sync)
* before we can safely let the old group leader die.
*/
* synchronize with any firing (by calling del_timer_sync)
* before we can safely let the old group leader die.
*/
- sig->real_timer.data =
(unsigned long)
current;
+ sig->real_timer.data = current;
spin_unlock_irq(lock);
spin_unlock_irq(lock);
- if (
del_timer_sync
(&sig->real_timer))
-
add_timer
(&sig->real_timer);
+ if (
hrtimer_cancel
(&sig->real_timer))
+
hrtimer_restart
(&sig->real_timer);
spin_lock_irq(lock);
}
while (atomic_read(&sig->count) > count) {
spin_lock_irq(lock);
}
while (atomic_read(&sig->count) > count) {
@@
-760,7
+760,7
@@
no_thread_group:
spin_lock(&oldsighand->siglock);
spin_lock(&newsighand->siglock);
spin_lock(&oldsighand->siglock);
spin_lock(&newsighand->siglock);
-
current->sighand = newsighand
;
+
rcu_assign_pointer(current->sighand, newsighand)
;
recalc_sigpending();
spin_unlock(&newsighand->siglock);
recalc_sigpending();
spin_unlock(&newsighand->siglock);
@@
-768,7
+768,7
@@
no_thread_group:
write_unlock_irq(&tasklist_lock);
if (atomic_dec_and_test(&oldsighand->count))
write_unlock_irq(&tasklist_lock);
if (atomic_dec_and_test(&oldsighand->count))
-
kmem_cache_free(sighand_cachep,
oldsighand);
+
sighand_free(
oldsighand);
}
BUG_ON(!thread_group_leader(current));
}
BUG_ON(!thread_group_leader(current));
@@
-780,7
+780,7
@@
no_thread_group:
* so that a new one can be started
*/
* so that a new one can be started
*/
-static
inline
void flush_old_files(struct files_struct * files)
+static void flush_old_files(struct files_struct * files)
{
long j = -1;
struct fdtable *fdt;
{
long j = -1;
struct fdtable *fdt;
@@
-885,6
+885,12
@@
int flush_old_exec(struct linux_binprm * bprm)
current->flags &= ~PF_RANDOMIZE;
flush_thread();
current->flags &= ~PF_RANDOMIZE;
flush_thread();
+ /* Set the new mm task size. We have to do that late because it may
+ * depend on TIF_32BIT which is only updated in flush_thread() on
+ * some architectures like powerpc
+ */
+ current->mm->task_size = TASK_SIZE;
+
if (bprm->e_uid != current->euid || bprm->e_gid != current->egid ||
file_permission(bprm->file, MAY_READ) ||
(bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
if (bprm->e_uid != current->euid || bprm->e_gid != current->egid ||
file_permission(bprm->file, MAY_READ) ||
(bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
@@
-964,7
+970,7
@@
int prepare_binprm(struct linux_binprm *bprm)
EXPORT_SYMBOL(prepare_binprm);
EXPORT_SYMBOL(prepare_binprm);
-static in
line in
t unsafe_exec(struct task_struct *p)
+static int unsafe_exec(struct task_struct *p)
{
int unsafe = 0;
if (p->ptrace & PT_PTRACED) {
{
int unsafe = 0;
if (p->ptrace & PT_PTRACED) {
@@
-1403,7
+1409,7
@@
static void zap_threads (struct mm_struct *mm)
do_each_thread(g,p) {
if (mm == p->mm && p != tsk &&
p->ptrace && p->parent->mm == mm) {
do_each_thread(g,p) {
if (mm == p->mm && p != tsk &&
p->ptrace && p->parent->mm == mm) {
- __ptrace_
unlink(p
);
+ __ptrace_
detach(p, 0
);
}
} while_each_thread(g,p);
write_unlock_irq(&tasklist_lock);
}
} while_each_thread(g,p);
write_unlock_irq(&tasklist_lock);
@@
-1462,6
+1468,7
@@
int do_coredump(long signr, int exit_code, struct pt_regs * regs)
if (!(current->signal->flags & SIGNAL_GROUP_EXIT)) {
current->signal->flags = SIGNAL_GROUP_EXIT;
current->signal->group_exit_code = exit_code;
if (!(current->signal->flags & SIGNAL_GROUP_EXIT)) {
current->signal->flags = SIGNAL_GROUP_EXIT;
current->signal->group_exit_code = exit_code;
+ current->signal->group_stop_count = 0;
retval = 0;
}
spin_unlock_irq(¤t->sighand->siglock);
retval = 0;
}
spin_unlock_irq(¤t->sighand->siglock);
@@
-1477,7
+1484,6
@@
int do_coredump(long signr, int exit_code, struct pt_regs * regs)
* Clear any false indication of pending signals that might
* be seen by the filesystem code called to write the core file.
*/
* Clear any false indication of pending signals that might
* be seen by the filesystem code called to write the core file.
*/
- current->signal->group_stop_count = 0;
clear_thread_flag(TIF_SIGPENDING);
if (current->signal->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
clear_thread_flag(TIF_SIGPENDING);
if (current->signal->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
@@
-1505,7
+1511,7
@@
int do_coredump(long signr, int exit_code, struct pt_regs * regs)
goto close_fail;
if (!file->f_op->write)
goto close_fail;
goto close_fail;
if (!file->f_op->write)
goto close_fail;
- if (do_truncate(file->f_dentry, 0, file) != 0)
+ if (do_truncate(file->f_dentry, 0,
0,
file) != 0)
goto close_fail;
retval = binfmt->core_dump(signr, regs, file);
goto close_fail;
retval = binfmt->core_dump(signr, regs, file);