diff options
author | Grant Grundler <grundler@chromium.org> | 2022-05-09 19:28:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-05-11 12:25:07 +0100 |
commit | 62e0ae0f4020250f961cf8d0103a4621be74e077 (patch) | |
tree | b55f40d28ccf303199b87ff36ae6a951f48db433 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 0807ce0b010418a191e0e4009803b2d74c3245d5 (diff) |
net: atlantic: fix "frag[0] not initialized"
In aq_ring_rx_clean(), if buff->is_eop is not set AND
buff->len < AQ_CFG_RX_HDR_SIZE, then hdr_len remains equal to
buff->len and skb_add_rx_frag(xxx, *0*, ...) is not called.
The loop following this code starts calling skb_add_rx_frag() starting
with i=1 and thus frag[0] is never initialized. Since i is initialized
to zero at the top of the primary loop, we can just reference and
post-increment i instead of hardcoding the 0 when calling
skb_add_rx_frag() the first time.
Reported-by: Aashay Shringarpure <aashay@google.com>
Reported-by: Yi Chou <yich@google.com>
Reported-by: Shervin Oloumi <enlightened@google.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions