From 02c541ec8ffa92178a93e74f1c77963d73772454 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 29 Dec 2003 05:41:43 -0800 Subject: [PATCH] [PATCH] use new steal_locks helper From: Chris Wright Use the new steal_locks helper to steal the locks from the old files struct left from unshare_files() when the new unshared struct files gets used. --- fs/binfmt_elf.c | 1 + fs/exec.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 69552f9854df8..bb989f53fbec7 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -645,6 +645,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) /* Discard our unneeded old files struct */ if (files) { + steal_locks(files); put_files_struct(files); files = NULL; } diff --git a/fs/exec.c b/fs/exec.c index c8527e3d021bf..34c5697d1a3b6 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -808,6 +808,7 @@ int flush_old_exec(struct linux_binprm * bprm) bprm->mm = NULL; /* We're using it now */ /* This is the point of no return */ + steal_locks(files); put_files_struct(files); current->sas_ss_sp = current->sas_ss_size = 0; -- 2.53.0