提交 a4fa4589 编写于 作者: A 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: NAlexei Starovoitov <ast@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册