Blob Blame History Raw
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 13 May 2020 08:46:58 +0200
Subject: bpfilter: switch to kernel_write
Patch-mainline: v5.8-rc5
Git-commit: 6955a76fbcd56d27c84c01353101048e366d070f
References: bsc#1155518

While pipes don't really need sb_writers projection, __kernel_write is an
interface better kept private, and the additional rw_verify_area does not
hurt here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Gary Lin <glin@suse.com>
---
 net/bpfilter/bpfilter_kern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/bpfilter/bpfilter_kern.c
+++ b/net/bpfilter/bpfilter_kern.c
@@ -50,7 +50,7 @@ static int __bpfilter_process_sockopt(st
 	req.len = optlen;
 	if (!bpfilter_ops.info.pid)
 		goto out;
-	n = __kernel_write(bpfilter_ops.info.pipe_to_umh, &req, sizeof(req),
+	n = kernel_write(bpfilter_ops.info.pipe_to_umh, &req, sizeof(req),
 			   &pos);
 	if (n != sizeof(req)) {
 		pr_err("write fail %zd\n", n);