lkml.org 
[lkml]   [2019]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] net: fjes: fix potential NULL pointer dereferences
From
From: Kangjie Lu <kjlu@umn.edu>
Date: Fri, 22 Mar 2019 22:52:21 -0500

> @@ -1252,8 +1252,16 @@ static int fjes_probe(struct platform_device *plat_dev)
> adapter->open_guard = false;
>
> adapter->txrx_wq = alloc_workqueue(DRV_NAME "/txrx", WQ_MEM_RECLAIM, 0);
> + if (!adapter->txrx_wq) {
> + err = -ENOMEM;
> + goto err_free_netdev;
> + }

These error paths have to undo the netif_napi_add() done by fjes_sw_init().

\
 
 \ /
  Last update: 2019-03-26 18:51    [W:0.086 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site