From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933460AbbGHPlT (ORCPT ); Wed, 8 Jul 2015 11:41:19 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:47864 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758863AbbGHPlC (ORCPT ); Wed, 8 Jul 2015 11:41:02 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Michael Davidson , Andrew Morton , Linus Torvalds , Kamal Mostafa Subject: [PATCH 3.13.y-ckt 18/56] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Date: Wed, 8 Jul 2015 08:39:59 -0700 Message-Id: <1436370037-25874-19-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436370037-25874-1-git-send-email-kamal@canonical.com> References: <1436370037-25874-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.13 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.13.11-ckt23 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrew Morton 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: Kamal Mostafa --- 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 99b4bcf..509e7549 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; } } -- 1.9.1