tun.c (fb3f903769e805221eb19209b3d9128d398038a1) tun.c (74a335a07a17d131b9263bfdbdcb5e40673ca9ca)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * TUN - Universal TUN/TAP device driver.
4 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com>
5 *
6 * $Id: tun.c,v 1.15 2002/03/01 02:44:24 maxk Exp $
7 */
8

--- 2487 unchanged lines hidden (view full) ---

2496 struct tun_file *tfile = container_of(sock, struct tun_file, socket);
2497 struct tun_struct *tun = tun_get(tfile);
2498 struct tun_msg_ctl *ctl = m->msg_control;
2499 struct xdp_buff *xdp;
2500
2501 if (!tun)
2502 return -EBADFD;
2503
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * TUN - Universal TUN/TAP device driver.
4 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com>
5 *
6 * $Id: tun.c,v 1.15 2002/03/01 02:44:24 maxk Exp $
7 */
8

--- 2487 unchanged lines hidden (view full) ---

2496 struct tun_file *tfile = container_of(sock, struct tun_file, socket);
2497 struct tun_struct *tun = tun_get(tfile);
2498 struct tun_msg_ctl *ctl = m->msg_control;
2499 struct xdp_buff *xdp;
2500
2501 if (!tun)
2502 return -EBADFD;
2503
2504 if (ctl && (ctl->type == TUN_MSG_PTR)) {
2504 if (m->msg_controllen == sizeof(struct tun_msg_ctl) &&
2505 ctl && ctl->type == TUN_MSG_PTR) {
2505 struct tun_page tpage;
2506 int n = ctl->num;
2507 int flush = 0, queued = 0;
2508
2509 memset(&tpage, 0, sizeof(tpage));
2510
2511 local_bh_disable();
2512 rcu_read_lock();

--- 1202 unchanged lines hidden ---
2506 struct tun_page tpage;
2507 int n = ctl->num;
2508 int flush = 0, queued = 0;
2509
2510 memset(&tpage, 0, sizeof(tpage));
2511
2512 local_bh_disable();
2513 rcu_read_lock();

--- 1202 unchanged lines hidden ---