[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190411.113337.186873310413516880.davem@davemloft.net>
Date: Thu, 11 Apr 2019 11:33:37 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jakub.kicinski@...ronome.com
Cc: vladbu@...lanox.com, netdev@...r.kernel.org, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us, lucasb@...atatu.com,
john.hurley@...ronome.com
Subject: Re: [PATCH net-next] net: sched: flower: use correct ht function
to prevent duplicates
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
Date: Thu, 11 Apr 2019 10:14:15 -0700
> On Thu, 11 Apr 2019 19:12:20 +0300, Vlad Buslov wrote:
>> Implementation of function rhashtable_insert_fast() check if its internal
>> helper function __rhashtable_insert_fast() returns non-NULL pointer and
>> seemingly return -EEXIST in such case. However, since
>> __rhashtable_insert_fast() is called with NULL key pointer, it never
>> actually checks for duplicates, which means that -EEXIST is never returned
>> to the user. Use rhashtable_lookup_insert_fast() hash table API instead. In
>> order to verify that it works as expected and prevent the problem from
>> happening in future, extend tc-tests with new test that verifies that no
>> new filters with existing key can be inserted to flower classifier.
>>
>> Fixes: 1f17f7742eeb ("net: sched: flower: insert filter to ht before offloading it to hw")
>> Signed-off-by: Vlad Buslov <vladbu@...lanox.com>
>
> Ah, John just posted the same patch internally this morning..
>
> Reviewed-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
Applied.
Powered by blists - more mailing lists