On Tue, 2016-12-06 at 14:31 +0800, Gao Feng wrote: > Because I don't fully hold the ipvlan codes now, I am afraid of that > there is someone which may get the port address when > ipvlan_port_destroy. So the original ipvlan_port_destroy uses the > kfree_rcu to avoid it. > > I am sure there is unnecessary to use kfree in ipvlan_port_create.
And I am pretty sure it is unnecessary to use kfree_rcu() in ipvlan_port_destroy() as well. I highly suggest you spend time on learning why.