[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171119.212416.1338898200006482751.davem@davemloft.net>
Date: Sun, 19 Nov 2017 21:24:16 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: lucien.xin@...il.com
Cc: netdev@...r.kernel.org, jasowang@...hat.com
Subject: Re: [PATCH net] tun: fix rcu_read_lock imbalance in tun_build_skb
From: Xin Long <lucien.xin@...il.com>
Date: Sun, 19 Nov 2017 19:31:04 +0800
> rcu_read_lock in tun_build_skb is used to rcu_dereference tun->xdp_prog
> safely, rcu_read_unlock should be done in every return path.
>
> Now I could see one place missing it, where it returns NULL in switch-case
> XDP_REDIRECT, another palce using rcu_read_lock wrongly, where it returns
> NULL in if (xdp_xmit) chunk.
>
> So fix both in this patch.
>
> Fixes: 761876c857cb ("tap: XDP support")
> Signed-off-by: Xin Long <lucien.xin@...il.com>
Good catch, applied, thanks!
Powered by blists - more mailing lists