Skip to content
Commit 48140a21 authored by Gao Feng's avatar Gao Feng Committed by David S. Miller
Browse files

driver: ipvlan: Free ipvl_port directly with kfree instead of kfree_rcu



There are two functions which would free the ipvl_port now. The first
is ipvlan_port_create. It frees the ipvl_port in the error handler,
so it could kfree it directly. The second is ipvlan_port_destroy. It
invokes netdev_rx_handler_unregister which enforces one grace period
by synchronize_net firstly, so it also could kfree the ipvl_port
directly and safely.

So it is unnecessary to use kfree_rcu to free ipvl_port.

Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ef0915ca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment