diff options
author | Magnus Karlsson <[email protected]> | 2021-09-29 08:14:03 +0200 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2021-09-29 13:59:13 +0200 |
commit | 3103836496e75095ac208cc180a9fe8f7ff33fd8 (patch) | |
tree | b5eed397003f8df2b1def39c22c2d36e3ef01b20 | |
parent | 38261f369fb905552ebdd3feb9699c0788fd3371 (diff) |
xsk: Fix clang build error in __xp_alloc
Fix a build error with clang in __xp_alloc():
[...]
net/xdp/xsk_buff_pool.c:465:15: error: variable 'xskb' is uninitialized
when used here [-Werror,-Wuninitialized]
xp_release(xskb);
^~~~
This is correctly detected by clang, but not gcc. In fact, the xp_release()
statement should not be there at all in the refactored code, just remove it.
Fixes: 94033cd8e73b ("xsk: Optimize for aligned case")
Reported-by: Nathan Chancellor <[email protected]>
Signed-off-by: Magnus Karlsson <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Maciej Fijalkowski <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
-rw-r--r-- | net/xdp/xsk_buff_pool.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c index 96b14e51ba7e..90c4e1e819d3 100644 --- a/net/xdp/xsk_buff_pool.c +++ b/net/xdp/xsk_buff_pool.c @@ -462,7 +462,6 @@ static struct xdp_buff_xsk *__xp_alloc(struct xsk_buff_pool *pool) for (;;) { if (!xskq_cons_peek_addr_unchecked(pool->fq, &addr)) { pool->fq->queue_empty_descs++; - xp_release(xskb); return NULL; } |