Guys, your commit d6572202d986 ("UBUNTU:SAUCE: exec: ensure file system accounting in check_unsafe_exec is correct") looks wrong for me, it leads to endless cycle in check_unsafe_exec().
fs/exec.c:: check_unsafe_exec() ... recheck: fs_recheck = false; t = p; n_fs = 1; spin_lock(&p->fs->lock); rcu_read_lock(); while_each_thread(p, t) { if (t->fs == p->fs) n_fs++; if (t->flags & (PF_EXITING | PF_FORKNOEXEC)) fs_recheck = true; } rcu_read_unlock();
if (p->fs->users > n_fs) { if (fs_recheck) { spin_unlock(&p->fs->lock); goto recheck; <<<<<< cycles forever } bprm->unsafe |= LSM_UNSAFE_SHARE; } else p->fs->in_exec = 1; spin_unlock(&p->fs->lock);
We have few Soft lockups inside VMs with ubuntu 16.04, where process was cyceled here. Should I submit you separate bug for this problem?
Guys, exec().
your commit d6572202d986 ("UBUNTU:SAUCE: exec: ensure file system accounting in check_unsafe_exec is correct") looks wrong for me,
it leads to endless cycle in check_unsafe_
fs/exec.c:: check_unsafe_exec()
spin_lock( &p->fs- >lock);
rcu_read_ lock();
while_ each_thread( p, t) {
n_fs+ +;
fs_recheck = true;
rcu_read_ unlock( );
...
recheck:
fs_recheck = false;
t = p;
n_fs = 1;
if (t->fs == p->fs)
if (t->flags & (PF_EXITING | PF_FORKNOEXEC))
}
if (p->fs->users > n_fs) {
spin_ unlock( &p->fs- >lock);
goto recheck; <<<<<< cycles forever
bprm- >unsafe |= LSM_UNSAFE_SHARE;
p->fs- >in_exec = 1;
spin_unlock( &p->fs- >lock);
if (fs_recheck) {
}
} else
We have few Soft lockups inside VMs with ubuntu 16.04, where process was cyceled here.
Should I submit you separate bug for this problem?