diff options
| author | 2026-10-07 17:36:02 +0000 | |
|---|---|---|
| committer | 2026-10-15 17:47:40 -0700 | |
| commit | 279877d86c8294c7d2f7a51ca755de79659af215 (patch) | |
| tree | 902c70c2486da0ce30cfd3f856dc4f95052e95db /scripts/Makefile.thinlto | |
| parent | net: skbuff: don't BUG() on a bad frag_list layout in skb_segment() (diff) | |
net: skbuff: don't BUG() when skb_copy_bits() fails in copy helpers
skb_copy(), skb_copy_expand() and skb_try_coalesce() all BUG() if
skb_copy_bits() fails. skb_copy_bits() only fails when the skb's
lengths don't add up, which is a bug somewhere else, usually in a
driver building the skb.
Each of these functions already has a failure return its callers handle:
- skb_copy() and skb_copy_expand() free the new skb and return NULL,
as they do when the allocation fails.
- skb_try_coalesce() returns false and the caller keeps the skbs
separate. Copy into the tailroom before skb_put() so that @to is
untouched on failure.
Take those returns, with a DEBUG_NET_WARN_ON_ONCE() for debug kernels.
__pskb_pull_tail() has the same BUG_ON(), but several of its callers
can't otherwise fail and don't check its return, so it's left for a
separate change that fixes them first.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://patch.msgid.link/20261007-b4-skbuff-bug-on-v2-3-b9a5f732895b@toxicpanda.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
