Jason A. Donenfeld <ja...@zx2c4.com> wrote: > + if (unlikely(skb_to_sgvec(skb, sg, offset, 8) < 0)) > + goto nomem; > ... > + if (unlikely(skb_to_sgvec(skb, sg, offset, len) < 0)) { > + if (sg != _sg) > + kfree(sg); > + goto nomem;
skb_to_sgvec() can return -EMSGSIZE in some circumstances. You shouldn't return -ENOMEM here in such a case. David