[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30529.1494853879@warthog.procyon.org.uk>
Date: Mon, 15 May 2017 14:11:19 +0100
From: David Howells <dhowells@...hat.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: dhowells@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, davem@...emloft.net,
kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always
Jason A. Donenfeld <Jason@...c4.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
Powered by blists - more mailing lists