You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
bpfilter: Initialize pos variable
Make sure 'pos' is initialized to zero before calling kernel_write().
Fixes: d2ba09c17a ("net: add skeleton of bpfilter kernel module")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user