lkml.org 
[lkml]   [2017]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always
Date
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

\
 
 \ /
  Last update: 2017-05-15 15:12    [W:0.058 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site