lkml.org 
[lkml]   [2018]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: cxgb3: add error handling for some functions
From
From: Zhouyang Jia <jiazhouyang09@gmail.com>
Date: Mon, 11 Jun 2018 16:42:26 +0800

> When sysfs_create_group or alloc_skb fails, the lack of error-handling
> code may cause unexpected results.
>
> This patch adds error-handling code after the functions.
>
> Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com>

The ->nofail_skb handling is perfectly fine.

It is a backup SKB, meant to handle alloc_skb() failures for the
primary 'skb' allocation the _next_ time this function is called.

Even if the ->nofail_skb allocation fails, the primary operation
done by init_tp_parity() has succeeeded and we should return
success.

All of the code in this function is perfectly prepared to handle
the case where ->nofail_skb is NULL.

\
 
 \ /
  Last update: 2018-06-11 23:23    [W:0.147 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site