From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D18E2C47095 for ; Sat, 3 Oct 2020 02:55:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94CCB20758 for ; Sat, 3 Oct 2020 02:55:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SjQF1AUs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725887AbgJCCzq (ORCPT ); Fri, 2 Oct 2020 22:55:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbgJCCzj (ORCPT ); Fri, 2 Oct 2020 22:55:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE8BC0613E2 for ; Fri, 2 Oct 2020 19:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=JjGPXD4WVwInpllMxZ87nv5UuquIpx8q4seK29XyhNo=; b=SjQF1AUsX7EdWWnCG4xYzOMhi6 Hgg9H4bJZEE2e/xgkyxQWBQmARpcBcta8f4ZxIL6LNh/dCnIqtfjTRtU6plWafK2rAQ3MKiUVZCXI il/n6ngzv8MVcCahhbDHgOJaCEC9Hc+bpns5XtrK9ebnI7CPkzPnbGWlvWxWeg8jqKhH5scAKn6g0 fPw2ErIC/J4GJDTFSazTQkeiaEg3wo5QSFwbXi3ZqH6VMwZiJvR+KZdskGFe2YK6s7QfCwH4usUiN 4madwA7I9NQIx5UfbgvFT4mRMsJ0/YSqAcYQVjyqTUD4OyawIZiMrRUCdDTAABkWPFbZg/kP6M+fv JM+synvQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOXhx-0005VJ-AS; Sat, 03 Oct 2020 02:55:37 +0000 From: "Matthew Wilcox (Oracle)" To: Al Viro Cc: "Matthew Wilcox (Oracle)" , Christoph Hellwig , linux-fsdevel@vger.kernel.org Subject: [PATCH 07/13] binfmt_flat: Pass a NULL pointer to kernel_read Date: Sat, 3 Oct 2020 03:55:28 +0100 Message-Id: <20201003025534.21045-8-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20201003025534.21045-1-willy@infradead.org> References: <20201003025534.21045-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org We want to start at 0 and do not care about the updated value. Signed-off-by: Matthew Wilcox (Oracle) --- fs/binfmt_flat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index f2f9086ebe98..b3f525be0a1a 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -891,7 +891,6 @@ static int load_flat_shared_library(int id, struct lib_info *libs) struct linux_binprm bprm; int res; char buf[16]; - loff_t pos = 0; memset(&bprm, 0, sizeof(bprm)); @@ -905,7 +904,7 @@ static int load_flat_shared_library(int id, struct lib_info *libs) if (IS_ERR(bprm.file)) return res; - res = kernel_read(bprm.file, bprm.buf, BINPRM_BUF_SIZE, &pos); + res = kernel_read(bprm.file, bprm.buf, BINPRM_BUF_SIZE, NULL); if (res >= 0) res = load_flat_file(&bprm, libs, id, NULL); -- 2.28.0