[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c45c1e4c-f9d9-f619-9f8e-d9f957c475c5@ucloud.cn>
Date: Fri, 12 Jun 2020 00:36:49 +0800
From: wenxu <wenxu@...oud.cn>
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net v2] flow_offload: fix incorrect cleanup for indirect
flow_blocks
在 2020/6/11 19:05, Pablo Neira Ayuso 写道:
> On Thu, Jun 11, 2020 at 06:03:17PM +0800, wenxu@...oud.cn wrote:
> [...]
>> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
>> index 0cfc35e..40eaf64 100644
>> --- a/net/core/flow_offload.c
>> +++ b/net/core/flow_offload.c
>> @@ -372,14 +372,13 @@ int flow_indr_dev_register(flow_indr_block_bind_cb_t *cb, void *cb_priv)
>> }
>> EXPORT_SYMBOL(flow_indr_dev_register);
>>
>> -static void __flow_block_indr_cleanup(flow_setup_cb_t *setup_cb, void *cb_priv,
>> +static void __flow_block_indr_cleanup(void (*release)(void *cb_priv),
>> struct list_head *cleanup_list)
>> {
>> struct flow_block_cb *this, *next;
>>
>> list_for_each_entry_safe(this, next, &flow_block_indr_list, indr.list) {
>> - if (this->cb == setup_cb &&
>> - this->cb_priv == cb_priv) {
>> + if (this->release == release) {
> Are you sure this is correct?
>
> This will remove _all_ existing representors in this driver.
>
> This will not work if only one representor is gone?
>
> Please, describe what scenario you are trying to fix.
>
> Thank you.
Yes you are right. But there still an another problem.
The match statements this->cb_priv == cb_priv always return false
the flow_block_cb->cb_priv is totally differnent data from
flow_indr_dev->cb_priv
in the dirvers.
>
Powered by blists - more mailing lists