summaryrefslogtreecommitdiff
path: root/net/sched/act_pedit.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2023-02-24 01:41:45 +0100
committerDavid S. Miller <davem@davemloft.net>2023-02-26 16:31:37 +0000
commitaaa3c08ee0653beaa649d4adfb27ad562641cfd8 (patch)
tree71ebfd10a3355c393e79aa37b61199173b1be210 /net/sched/act_pedit.c
parent5064561090fda0ca059d2961f9922e2b7afea36a (diff)
qede: avoid uninitialized entries in coal_entry array
Even after commit 908d4bb7c54c ("qede: fix interrupt coalescing configuration"), some entries of the coal_entry array may theoretically be used uninitialized: 1. qede_alloc_fp_array() allocates QEDE_MAX_RSS_CNT entries for coal_entry. The initial allocation uses kcalloc, so everything is initialized. 2. The user sets a small number of queues (ethtool -L). coal_entry is reallocated for the actual small number of queues. 3. The user sets a bigger number of queues. coal_entry is reallocated bigger. The added entries are not necessarily initialized. In practice, the reallocations will actually keep using the originally allocated region of memory, but we should not rely on it. The reallocation is unnecessary. coal_entry can always have QEDE_MAX_RSS_CNT entries. Fixes: 908d4bb7c54c ("qede: fix interrupt coalescing configuration") Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Nacked-by: Manish Chopra <manishc@marvell.com> Acked-by: Manish Chopra <manishc@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_pedit.c')
0 files changed, 0 insertions, 0 deletions