]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: net: tcp_mmap: clear whole tcp_zerocopy_receive struct
authorEric Dumazet <edumazet@google.com>
Wed, 6 May 2020 03:51:06 +0000 (20:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 May 2020 20:45:09 +0000 (13:45 -0700)
commite3d78178059b89c9719618a1ce6454ba267b63c0
treeaf4918566cfaa90205362758a7ef9ba3b0c89626
parent358cea7e6a342f7b0b5ca3b44e8a3d4ace2aa154
selftests: net: tcp_mmap: clear whole tcp_zerocopy_receive struct

We added fields in tcp_zerocopy_receive structure,
so make sure to clear all fields to not pass garbage to the kernel.

We were lucky because recent additions added 'out' parameters,
still we need to clean our reference implementation, before folks
copy/paste it.

Fixes: 87a9d1dbf7eb ("tcp-zerocopy: Return inq along with tcp receive zerocopy.")
Fixes: 8221587bb9ca ("tcp-zerocopy: Return sk_err (if set) along with tcp receive zerocopy.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Arjun Roy <arjunroy@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/tcp_mmap.c