|
@@ -871,6 +871,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
|
elf_prot, elf_flags);
|
|
elf_prot, elf_flags);
|
|
if (BAD_ADDR(error)) {
|
|
if (BAD_ADDR(error)) {
|
|
send_sig(SIGKILL, current, 0);
|
|
send_sig(SIGKILL, current, 0);
|
|
|
|
+ retval = IS_ERR((void *)error) ?
|
|
|
|
+ PTR_ERR((void*)error) : -EINVAL;
|
|
goto out_free_dentry;
|
|
goto out_free_dentry;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -900,6 +902,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
|
TASK_SIZE - elf_ppnt->p_memsz < k) {
|
|
TASK_SIZE - elf_ppnt->p_memsz < k) {
|
|
/* set_brk can never work. Avoid overflows. */
|
|
/* set_brk can never work. Avoid overflows. */
|
|
send_sig(SIGKILL, current, 0);
|
|
send_sig(SIGKILL, current, 0);
|
|
|
|
+ retval = -EINVAL;
|
|
goto out_free_dentry;
|
|
goto out_free_dentry;
|
|
}
|
|
}
|
|
|
|
|