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: cd5681d7d8 ("tuntap: rename struct tun_steering_prog to struct tun_prog")
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jason Wang 2018-01-22 10:55:38 +08:00 committed by David S. Miller
parent ebdd7b491b
commit 9d6474e458
1 changed files with 2 additions and 1 deletions

View File

@ -2225,7 +2225,8 @@ static void tun_prog_free(struct rcu_head *rcu)
kfree(prog); 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 bpf_prog *prog)
{ {
struct tun_prog *old, *new = NULL; struct tun_prog *old, *new = NULL;