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
sis190: RTNL and flush_scheduled_work deadlock
[firefly-linux-kernel-4.4.55.git]
/
fs
/
exec.c
diff --git
a/fs/exec.c
b/fs/exec.c
index add0e03c3ea908a6baf81d3b16b1065716c5a8ff..7e36c6f6f538adaf0bf4559e6de3b49579141c8e 100644
(file)
--- a/
fs/exec.c
+++ b/
fs/exec.c
@@
-38,6
+38,7
@@
#include <linux/binfmts.h>
#include <linux/swap.h>
#include <linux/utsname.h>
#include <linux/binfmts.h>
#include <linux/swap.h>
#include <linux/utsname.h>
+#include <linux/pid_namespace.h>
#include <linux/module.h>
#include <linux/namei.h>
#include <linux/proc_fs.h>
#include <linux/module.h>
#include <linux/namei.h>
#include <linux/proc_fs.h>
@@
-404,12
+405,10
@@
int setup_arg_pages(struct linux_binprm *bprm,
bprm->loader += stack_base;
bprm->exec += stack_base;
bprm->loader += stack_base;
bprm->exec += stack_base;
- mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+ mpnt = kmem_cache_
z
alloc(vm_area_cachep, GFP_KERNEL);
if (!mpnt)
return -ENOMEM;
if (!mpnt)
return -ENOMEM;
- memset(mpnt, 0, sizeof(*mpnt));
-
down_write(&mm->mmap_sem);
{
mpnt->vm_mm = mm;
down_write(&mm->mmap_sem);
{
mpnt->vm_mm = mm;
@@
-620,8
+619,8
@@
static int de_thread(struct task_struct *tsk)
* Reparenting needs write_lock on tasklist_lock,
* so it is safe to do it under read_lock.
*/
* Reparenting needs write_lock on tasklist_lock,
* so it is safe to do it under read_lock.
*/
- if (unlikely(tsk->group_leader == child_reaper))
- child_reaper = tsk;
+ if (unlikely(tsk->group_leader == child_reaper
(tsk)
))
+
tsk->nsproxy->pid_ns->
child_reaper = tsk;
zap_other_threads(tsk);
read_unlock(&tasklist_lock);
zap_other_threads(tsk);
read_unlock(&tasklist_lock);
@@
-782,7
+781,7
@@
static void flush_old_files(struct files_struct * files)
j++;
i = j * __NFDBITS;
fdt = files_fdtable(files);
j++;
i = j * __NFDBITS;
fdt = files_fdtable(files);
- if (i >= fdt->max_fds
|| i >= fdt->max_fdset
)
+ if (i >= fdt->max_fds)
break;
set = fdt->close_on_exec->fds_bits[j];
if (!set)
break;
set = fdt->close_on_exec->fds_bits[j];
if (!set)
@@
-912,7
+911,7
@@
EXPORT_SYMBOL(flush_old_exec);
int prepare_binprm(struct linux_binprm *bprm)
{
int mode;
int prepare_binprm(struct linux_binprm *bprm)
{
int mode;
- struct inode * inode = bprm->file->f_dentry->d_inode;
+ struct inode * inode = bprm->file->f_
path.
dentry->d_inode;
int retval;
mode = inode->i_mode;
int retval;
mode = inode->i_mode;
@@
-922,7
+921,7
@@
int prepare_binprm(struct linux_binprm *bprm)
bprm->e_uid = current->euid;
bprm->e_gid = current->egid;
bprm->e_uid = current->euid;
bprm->e_gid = current->egid;
- if(!(bprm->file->f_
vfs
mnt->mnt_flags & MNT_NOSUID)) {
+ if(!(bprm->file->f_
path.
mnt->mnt_flags & MNT_NOSUID)) {
/* Set-uid? */
if (mode & S_ISUID) {
current->personality &= ~PER_CLEAR_ON_SETID;
/* Set-uid? */
if (mode & S_ISUID) {
current->personality &= ~PER_CLEAR_ON_SETID;
@@
-1519,10
+1518,10
@@
int do_coredump(long signr, int exit_code, struct pt_regs * regs)
0600);
if (IS_ERR(file))
goto fail_unlock;
0600);
if (IS_ERR(file))
goto fail_unlock;
- inode = file->f_dentry->d_inode;
+ inode = file->f_
path.
dentry->d_inode;
if (inode->i_nlink > 1)
goto close_fail; /* multiple links - don't dump */
if (inode->i_nlink > 1)
goto close_fail; /* multiple links - don't dump */
- if (!ispipe && d_unhashed(file->f_dentry))
+ if (!ispipe && d_unhashed(file->f_
path.
dentry))
goto close_fail;
/* AK: actually i see no reason to not allow this for named pipes etc.,
goto close_fail;
/* AK: actually i see no reason to not allow this for named pipes etc.,
@@
-1533,7
+1532,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 (!ispipe && do_truncate(file->f_dentry, 0, 0, file) != 0)
+ if (!ispipe && do_truncate(file->f_
path.
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);