[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f3769cce-1b24-c938-a672-f511afa9d423@iogearbox.net>
Date: Tue, 13 Aug 2019 16:32:53 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Petar Penkov <ppenkov.kernel@...il.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Cc: davem@...emloft.net, ast@...nel.org, sdf@...gle.com,
Petar Penkov <ppenkov@...gle.com>
Subject: Re: [bpf-next] selftests/bpf: fix race in flow dissector tests
On 8/13/19 1:30 AM, Petar Penkov wrote:
> From: Petar Penkov <ppenkov@...gle.com>
>
> Since the "last_dissection" map holds only the flow keys for the most
> recent packet, there is a small race in the skb-less flow dissector
> tests if a new packet comes between transmitting the test packet, and
> reading its keys from the map. If this happens, the test packet keys
> will be overwritten and the test will fail.
>
> Changing the "last_dissection" map to a hash map, keyed on the
> source/dest port pair resolves this issue. Additionally, let's clear the
> last test results from the map between tests to prevent previous test
> cases from interfering with the following test cases.
>
> Fixes: 0905beec9f52 ("selftests/bpf: run flow dissector tests in skb-less mode")
> Signed-off-by: Petar Penkov <ppenkov@...gle.com>
Applied, thanks!
Powered by blists - more mailing lists