linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Christoph Hellwig <hch@lst.de>,
	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	[thread overview]
Message-ID: <20201003025534.21045-8-willy@infradead.org> (raw)
In-Reply-To: <20201003025534.21045-1-willy@infradead.org>

We want to start at 0 and do not care about the updated value.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 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


  parent reply	other threads:[~2020-10-03  2:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03  2:55 [PATCH 00/13] Clean up kernel_read/kernel_write Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 01/13] fs: Allow a NULL pos pointer to __kernel_write Matthew Wilcox (Oracle)
2020-10-15 17:56   ` Christoph Hellwig
2020-10-03  2:55 ` [PATCH 02/13] fs: Allow a NULL pos pointer to __kernel_read Matthew Wilcox (Oracle)
2020-10-15 17:56   ` Christoph Hellwig
2020-10-03  2:55 ` [PATCH 03/13] fs/acct: Pass a NULL pointer to __kernel_write Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 04/13] um/mconsole: Pass a NULL pointer to kernel_read Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 05/13] x86/aout: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 06/13] aout: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` Matthew Wilcox (Oracle) [this message]
2020-10-03  2:55 ` [PATCH 08/13] exec: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 09/13] bpfilter: Pass a NULL pointer to kernel_read and kernel_write Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 10/13] keys: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 11/13] target: Pass a NULL pointer to kernel_write Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 12/13] proc: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 13/13] usermode: " Matthew Wilcox (Oracle)
2020-10-03  3:47 ` [PATCH 00/13] Clean up kernel_read/kernel_write Al Viro
2020-10-09 22:07   ` Eric Biggers
2020-10-15 17:56 ` Christoph Hellwig
2020-10-15 18:23   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201003025534.21045-8-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).