]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
bpfilter: switch to kernel_write
authorChristoph Hellwig <hch@lst.de>
Wed, 13 May 2020 06:46:58 +0000 (08:46 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 8 Jul 2020 06:27:56 +0000 (08:27 +0200)
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>
net/bpfilter/bpfilter_kern.c

index c0f0990f30b60415fa6b929415f5ac67bba4ed01..1905e01c3aa9a7f92f949877f82e72e45d90f8d4 100644 (file)
@@ -50,7 +50,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname,
        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);