Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965883AbbFJPsH (ORCPT ); Wed, 10 Jun 2015 11:48:07 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:36142 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933850AbbFJP1v (ORCPT ); Wed, 10 Jun 2015 11:27:51 -0400 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Andrew Morton , Michael Davidson , Linus Torvalds , Jiri Slaby Subject: [PATCH 3.12 085/111] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Date: Wed, 10 Jun 2015 17:27:14 +0200 Message-Id: X-Mailer: git-send-email 2.4.2 In-Reply-To: <93091169a673f49c2574cddf1ef858cf0704f646.1433943052.git.jslaby@suse.cz> References: <93091169a673f49c2574cddf1ef858cf0704f646.1433943052.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1306 Lines: 41 From: Andrew Morton 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 2b1d3ae940acd11be44c6eced5873d47c2e00ffa upstream. load_elf_binary() returns `retval', not `error'. Fixes: a87938b2e246b81b4fb ("fs/binfmt_elf.c: fix bug in loading of PIE binaries") Reported-by: James Hogan Cc: Michael Davidson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Jiri Slaby --- fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index ec6d0de19694..d872fda15539 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -822,7 +822,7 @@ static int load_elf_binary(struct linux_binprm *bprm) total_size = total_mapping_size(elf_phdata, loc->elf_ex.e_phnum); if (!total_size) { - error = -EINVAL; + retval = -EINVAL; goto out_free_dentry; } } -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/