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 09/13] bpfilter: Pass a NULL pointer to kernel_read and kernel_write
Date: Sat,  3 Oct 2020 03:55:30 +0100	[thread overview]
Message-ID: <20201003025534.21045-10-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>
---
 net/bpfilter/bpfilter_kern.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c
index 51a941b56ec3..bca294c9253f 100644
--- a/net/bpfilter/bpfilter_kern.c
+++ b/net/bpfilter/bpfilter_kern.c
@@ -34,21 +34,18 @@ static void __stop_umh(void)
 static int bpfilter_send_req(struct mbox_request *req)
 {
 	struct mbox_reply reply;
-	loff_t pos = 0;
 	ssize_t n;
 
 	if (!bpfilter_ops.info.tgid)
 		return -EFAULT;
-	pos = 0;
 	n = kernel_write(bpfilter_ops.info.pipe_to_umh, req, sizeof(*req),
-			   &pos);
+			   NULL);
 	if (n != sizeof(*req)) {
 		pr_err("write fail %zd\n", n);
 		goto stop;
 	}
-	pos = 0;
 	n = kernel_read(bpfilter_ops.info.pipe_from_umh, &reply, sizeof(reply),
-			&pos);
+			NULL);
 	if (n != sizeof(reply)) {
 		pr_err("read fail %zd\n", n);
 		goto stop;
-- 
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 ` [PATCH 07/13] binfmt_flat: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` [PATCH 08/13] exec: " Matthew Wilcox (Oracle)
2020-10-03  2:55 ` Matthew Wilcox (Oracle) [this message]
2020-10-03  2:55 ` [PATCH 10/13] keys: Pass a NULL pointer to kernel_read and kernel_write 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-10-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).