[PATCH 09/13] bpfilter: Pass a NULL pointer to kernel_read and kernel_write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux