[ovs-dev] [PATCH 2/2] dpif-netdev: Prevent unsafe access when retrieving meter stats.

Justin Pettit jpettit at ovn.org
Wed Sep 5 18:44:49 UTC 2018


> On Aug 30, 2018, at 7:25 AM, Flavio Leitner <fbl at sysclose.org> wrote:
> 
> On Tue, Aug 28, 2018 at 05:46:14PM -0700, Justin Pettit wrote:
>> dpif_netdev_meter_get() retrieved a pointer to a meter entry without
>> holding a lock.  It's possible that another thread could have deleted
>> that entry between retrieving the pointer and dereferencing the pointer.
>> This makes the function hold the lock the entire time the meter entry is
>> needed.
>> 
>> Found by inspection.
>> 
>> Signed-off-by: Justin Pettit <jpettit at ovn.org>
>> ---
> 
> Acked-by: Flavio Leitner <fbl at sysclose.org>

Thank you.  I pushed this to master and all the way back to branch-2.8.

--Justin




More information about the dev mailing list