Re: [PATCH net-next v3 2/2] vxlan: allow specifying multiple default destinations
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2013-05-31 16:17:45
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2013-05-31 16:17:45
Looking at this code in more detail, I see a slew of problems. First the list of destinations isn't really a list. The default one is still embedded in the fdb entry. This means you can't change it safely. Also the notification via netlink only sends back a single destination value. And the lack of locking on the open coded link list means it is not safe since the forwarding table is used with RCU. In order to be safe, proper RCU barriers would be needed or better yet convert to list_rcu.. Overall, I feel guilty for not inspecting this more closely and am surprised that others did not catch the lack of locking.