[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+6hz4pTrPQezJXQsR_-QNLF8FQqtrBDieX-3=znTBDQ4AO-JA@mail.gmail.com>
Date: Wed, 7 Dec 2016 08:35:35 +0800
From: Gao Feng <fgao@...ai8.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Mahesh Bandewar <maheshb@...gle.com>,
Eric Dumazet <edumazet@...gle.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 1/1] driver: ipvlan: Free ipvl_port directly
with kfree instead of kfree_rcu
Hi Eric,
On Tue, Dec 6, 2016 at 11:18 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Tue, 2016-12-06 at 21:54 +0800, fgao@...ai8.com wrote:
>> From: Gao Feng <gfree.wind@...il.com>
>>
>> There is no one which may reference the ipvlan port when free it in
>> ipvlan_port_create and ipvlan_port_destroy. So it is unnecessary to
>> use kfree_rcu.
>
> You did not really explain _why_ it was safe/unnecessary.
> Why should anyone trust you ?
Thanks your point.
I found the reason yesterday after receive your suggestion and reply
the last v1 email.
Then I send the v2 patch.
I assume the reviewer would know more than me, so I didn't add more details.
I will add more details in v3 patch.
>
> The reason an RCU grace period is not needed is that
> netdev_rx_handler_unregister() already enforces a grace period.
>
> My guess is ipvlan copied code in macvlan.
>
> At the time macvlan was written, commit
> 00cfec37484761a44 ("net: add a synchronize_net() in
> netdev_rx_handler_unregister()") was not there yet.
>
> macvlan could be changed the same way.
Yes. After I find the netdev_rx_handler_unregister which enforces one
grace period.
I prepare to check other codes.
Best Regards
Feng
>
>
>
Powered by blists - more mailing lists