Commit 6955a76f authored by Christoph Hellwig's avatar Christoph Hellwig

bpfilter: switch to kernel_write

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: default avatarChristoph Hellwig <hch@lst.de>
parent 13c164b1
...@@ -50,7 +50,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname, ...@@ -50,7 +50,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname,
req.len = optlen; req.len = optlen;
if (!bpfilter_ops.info.pid) if (!bpfilter_ops.info.pid)
goto out; 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); &pos);
if (n != sizeof(req)) { if (n != sizeof(req)) {
pr_err("write fail %zd\n", n); pr_err("write fail %zd\n", n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment