aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 41773af7e3dc..88ce7d9ceff5 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1579,11 +1579,10 @@ static void check_unsafe_exec(struct linux_binprm *bprm)
* will be able to manipulate the current directory, etc.
* It would be nice to force an unshare instead...
*/
- t = p;
n_fs = 1;
spin_lock(&p->fs->lock);
rcu_read_lock();
- while_each_thread(p, t) {
+ for_other_threads(p, t) {
if (t->fs == p->fs)
n_fs++;
}