Commit a4fa4589 authored by Alexei Starovoitov's avatar Alexei Starovoitov

bpfilter: Initialize pos variable

Make sure 'pos' is initialized to zero before calling kernel_write().

Fixes: d2ba09c1 ("net: add skeleton of bpfilter kernel module")
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent ec2ffdf6
......@@ -48,6 +48,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname,
req.len = optlen;
if (!bpfilter_ops.info.tgid)
goto out;
pos = 0;
n = kernel_write(bpfilter_ops.info.pipe_to_umh, &req, sizeof(req),
&pos);
if (n != sizeof(req)) {
......
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