From patchwork Wed Oct 19 07:43:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rolf Eike Beer X-Patchwork-Id: 13011437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19C07C433FE for ; Wed, 19 Oct 2022 07:43:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 735C16B0072; Wed, 19 Oct 2022 03:43:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E5C06B0073; Wed, 19 Oct 2022 03:43:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D4F16B0074; Wed, 19 Oct 2022 03:43:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4F6C06B0072 for ; Wed, 19 Oct 2022 03:43:05 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 142761A0A9C for ; Wed, 19 Oct 2022 07:43:05 +0000 (UTC) X-FDA: 80036907930.28.BC8A8E1 Received: from mx1.emlix.com (mx1.emlix.com [136.243.223.33]) by imf08.hostedemail.com (Postfix) with ESMTP id 42CAB160034 for ; Wed, 19 Oct 2022 07:43:03 +0000 (UTC) Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 69C9C5FB28; Wed, 19 Oct 2022 09:43:02 +0200 (CEST) From: Rolf Eike Beer To: Alexander Viro , Eric Biederman , Kees Cook Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] binfmt_elf: fix documented return value for load_elf_phdrs() Date: Wed, 19 Oct 2022 09:43:01 +0200 Message-ID: <2359389.EDbqzprbEW@mobilepool36.emlix.com> MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; spf=pass (imf08.hostedemail.com: domain of eb@emlix.com designates 136.243.223.33 as permitted sender) smtp.mailfrom=eb@emlix.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666165384; a=rsa-sha256; cv=none; b=Pz1uDkbYwOTw9KiTrSpfHP32sWprJeZ4AJsbhcCg+8KJAoI+rO+PG2U0OjVglRFE5VNjIB 7Os1pUu7WutxHDo4O2Db3O4OgV7GnXXabzyPMglqcvqthZzvAIihl80OfXqsHzu4R2RsRB bs8+pdE5n1kmYqAJB7w4RPqhHzhW20Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666165384; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=qyNXYGFhUM/GNOtcXC7scuZrvXuMRcLPrSD2DmJ8eP4=; b=mt7sUouq0E9j9NBFi1ogrZsIkgyP70va8iW3pttLk1jRQ0L5JOCo3c36gwB0fWNqybj66w syriCKXuNGqK3/E7nwz9ccrouQCD3+6zAj+O8aDaGZ8Cz7xhrwbxNWZV/Qfb9q1hNUtFN3 nRX4tCOzROZNAPzKUlGSZsLEXUE+VWM= X-Stat-Signature: pgqgei5hzkto755tiqfoqfr66cfgjz7o X-Rspamd-Queue-Id: 42CAB160034 Authentication-Results: imf08.hostedemail.com; dkim=none; spf=pass (imf08.hostedemail.com: domain of eb@emlix.com designates 136.243.223.33 as permitted sender) smtp.mailfrom=eb@emlix.com; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1666165383-133267 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This function has never returned anything but a plain NULL. Fixes: 6a8d38945cf4 ("binfmt_elf: Hoist ELF program header loading to a function") Signed-off-by: Rolf Eike Beer --- 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 63c7ebb0da89..cfd5f7ad019d 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -456,7 +456,7 @@ static unsigned long maximum_alignment(struct elf_phdr *cmds, int nr) * * Loads ELF program headers from the binary file elf_file, which has the ELF * header pointed to by elf_ex, into a newly allocated array. The caller is - * responsible for freeing the allocated data. Returns an ERR_PTR upon failure. + * responsible for freeing the allocated data. Returns NULL upon failure. */ static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex, struct file *elf_file)