[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 29 May 2013 12:01:12 +0800
From: Cong Wang <amwang@...hat.com>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next] vxlan: do real refcnt for vn_sock
On Tue, 2013-05-28 at 19:07 +0800, Cong Wang wrote:
> From: Cong Wang <amwang@...hat.com>
>
> In commit 553675fb5e9ce3d71a (vxlan: listen on multiple ports),
> we use kfree_rcu() to free ->vn_sock, but a) there is no use
> of RCU API to access this filed, b) RCU is not enough to do refcnt
> here, because in vxlan_leave_group() we drop RTNL lock before
> locking the socket, it could be possible that this field is
> freed during this period.
>
> So, instead making things complex, just do basic refcnt for
> the ->vn_sock, like we do for others.
BTW, this patch fixes a real crash when I test vxlan over IPv6, although
I can't reproduce it with IPv4.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists