summaryrefslogtreecommitdiff
path: root/tools/lib/subcmd/sigchain.h
blob: 0c919f2874ca37b4b2d5414f7f5473b95cfd8d23 (plain)
1
2
3
4
5
6
7
8
9
10
#ifndef __SUBCMD_SIGCHAIN_H
#define __SUBCMD_SIGCHAIN_H

typedef void (*sigchain_fun)(int);

int sigchain_pop(int sig);

void sigchain_push_common(sigchain_fun f);

#endif /* __SUBCMD_SIGCHAIN_H */
2017-02-06 22:41:27 -0500 commite1edab87faf6ca30cd137e0795bc73aa9a9a22ec (patch) tree6bed425132b0eb1c3808a012ad5f81799df0d78c /drivers parentccf7abb93af09ad0868ae9033d1ca8108bdaec82 (diff)
tun: read vnet_hdr_sz once
When IFF_VNET_HDR is enabled, a virtio_net header must precede data. Data length is verified to be greater than or equal to expected header length tun->vnet_hdr_sz before copying. Read this value once and cache locally, as it can be updated between the test and use (TOCTOU). Signed-off-by: Willem de Bruijn <willemb@google.com> Reported-by: Dmitry Vyukov <dvyukov@google.com> CC: Eric Dumazet <edumazet@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/tun.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c