# Re: \[PATCH net-next\] tun: add missing rcu annotation in tun\_set\_ebpf()

- From: David Miller \<davem@davemloft.net\>
- Date: 2020-08-01 00:18:20 
- List: netdev
- Page: https://ratatoskr.run/netdev/2020/08/6057152
- Thread: https://ratatoskr.run/netdev/2020/07/6056130/t.md

```text
From: Jason Wang <redacted>
Date: Fri, 31 Jul 2020 00:17:20 -0400

> We expecte prog_p to be protected by rcu, so adding the rcu annotation
> to fix the following sparse warning:
> 
> drivers/net/tun.c:3003:36: warning: incorrect type in argument 2 (different address spaces)
> drivers/net/tun.c:3003:36:    expected struct tun_prog [noderef] __rcu **prog_p
> drivers/net/tun.c:3003:36:    got struct tun_prog **prog_p
> drivers/net/tun.c:3292:42: warning: incorrect type in argument 2 (different address spaces)
> drivers/net/tun.c:3292:42:    expected struct tun_prog **prog_p
> drivers/net/tun.c:3292:42:    got struct tun_prog [noderef] __rcu **
> drivers/net/tun.c:3296:42: warning: incorrect type in argument 2 (different address spaces)
> drivers/net/tun.c:3296:42:    expected struct tun_prog **prog_p
> drivers/net/tun.c:3296:42:    got struct tun_prog [noderef] __rcu **
> 
> Reported-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Jason Wang <redacted>

Applied, thanks.
```
