mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
a95a4d9b39
For the case when xp_alloc_batch() is used but the batched allocation
cannot be used, there is a slow path that uses the non-batched
xp_alloc(). When it fails to allocate an entry, it returns NULL. The
current code wrote this NULL into the entry of the provided results
array (pointer to the driver SW ring usually) and returned. This might
not be what the driver expects and to make things simpler, just write
successfully allocated xdp_buffs into the SW ring,. The driver might
have information in there that is still important after an allocation
failure.
Note that at this point in time, there are no drivers using
xp_alloc_batch() that could trigger this slow path. But one might get
added.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
xdp_umem.c | ||
xdp_umem.h | ||
xsk.c | ||
xsk.h | ||
xsk_buff_pool.c | ||
xsk_diag.c | ||
xsk_queue.c | ||
xsk_queue.h | ||
xskmap.c |