mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
UPSTREAM: bpfilter: Initialize pos variable
Make sure 'pos' is initialized to zero before calling kernel_write().
Fixes: d2ba09c17a ("net: add skeleton of bpfilter kernel module")
Change-Id: I7d7e53e5e18f9ee05fb5a30b9629a3e09af1c913
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
This commit is contained in:
parent
30e262549b
commit
0fc6df7760
1 changed files with 1 additions and 0 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue