Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always | Date | Mon, 15 May 2017 14:11:19 +0100 |
| |
Jason A. Donenfeld <Jason@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
| |