From: Jason Wang <jasowang@redhat.com>
Date: Mon, 22 Jan 2018 10:55:38 +0800
Subject: tun: add missing rcu annotation
Patch-mainline: v4.16-rc1
Git-commit: 9d6474e458b13a94a0d5b141f2b8f38adf1991ae
References: bsc#1109837
This patch fixes the following sparse warnings:
drivers/net/tun.c:2241:15: error: incompatible types in comparison expression (different address spaces)
Fixes: cd5681d7d890 ("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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/net/tun.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -2223,7 +2223,8 @@ static void tun_prog_free(struct rcu_hea
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;