Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1641659 > unrolled thread

Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always

Started byDavid Howells <dhowells@redhat.com>
First post2017-05-15 15:20 +0200
Last post2017-05-17 00:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always David Howells <dhowells@redhat.com> - 2017-05-15 15:20 +0200
    Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-05-17 00:20 +0200

#1641659 — Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always

FromDavid Howells <dhowells@redhat.com>
Date2017-05-15 15:20 +0200
SubjectRe: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always
Message-ID<tHo4O-fL-31@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1642867

From"Jason A. Donenfeld" <Jason@zx2c4.com>
Date2017-05-17 00:20 +0200
Message-ID<tHSYW-371-9@gated-at.bofh.it>
In reply to#1641659
On Mon, May 15, 2017 at 3:11 PM, David Howells <dhowells@redhat.com> wrote:
> skb_to_sgvec() can return -EMSGSIZE in some circumstances.  You shouldn't
> return -ENOMEM here in such a case.

Noted. I'll fix this up for the next round.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web