Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d6474e4 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

tun: add missing rcu annotation



This patch fixes the following sparse warnings:

drivers/net/tun.c:2241:15: error: incompatible types in comparison expression (different address spaces)

Fixes: cd5681d7 ("tuntap: rename struct tun_steering_prog to struct tun_prog")
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ebdd7b49
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2225,7 +2225,8 @@ static void tun_prog_free(struct rcu_head *rcu)
	kfree(prog);
}

static int __tun_set_ebpf(struct tun_struct *tun, struct tun_prog **prog_p,
static int __tun_set_ebpf(struct tun_struct *tun,
			  struct tun_prog __rcu **prog_p,
			  struct bpf_prog *prog)
{
	struct tun_prog *old, *new = NULL;