lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FA2DD268-9578-49B5-8E9E-D3FA8C9AEDFC@umn.edu>
Date:   Fri, 22 Mar 2019 22:26:37 -0500
From:   Kangjie Lu <kjlu@....edu>
To:     kjlu@....edu
Cc:     pakki001@....edu, Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: fm10k: fix a potential NULL pointer dereference



> On Mar 11, 2019, at 1:17 AM, Kangjie Lu <kjlu@....edu> wrote:
> 
> In case alloc_workqueue fails, the fix returns -ENOMEM to avoid
> potential NULL pointer dereference.
> 
> Signed-off-by: Kangjie Lu <kjlu@....edu>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> index 5a0419421511..215f232674f1 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> @@ -41,6 +41,8 @@ static int __init fm10k_init_module(void)
> 	/* create driver workqueue */
> 	fm10k_workqueue = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0,
> 					  fm10k_driver_name);
> +	if (unlikely(!fm10k_workqueue))
> +		return -ENOMEM;
> 

Jeff, can you review this patch?

Thanks.

> 	fm10k_dbg_init();
> 
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ