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] [day] [month] [year] [list]
Message-ID: <56B15871.8020206@acm.org>
Date:	Tue, 2 Feb 2016 20:31:29 -0500
From:	Ed Cashin <ed.cashin@....org>
To:	Insu Yun <wuninsu@...il.com>, linux-kernel@...r.kernel.org
Cc:	taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
	changwoo@...ech.edu
Subject: Re: [PATCH] aoe: remove unnecessary check for failing kthread
 creation

On 02/01/2016 10:53 AM, Insu Yun wrote:
> When kthread_run fails, it returns ERR, not NULL.
> Therefore, NULL checking is redundant.
> (https://www.kernel.org/doc/htmldocs/device-drivers/API-kthread-run.html)

Thanks, the change looks reasonable.

...
>   	task = kthread_run(kthread, k, "%s", k->name);
> -	if (task == NULL || IS_ERR(task))
> +	if (IS_ERR(task))
>   		return -ENOMEM;

Interestingly, after this change, it's more clear that returning
-ENOMEM is a bit misleading when the underlying kernel/kthread.c
function, kthread_create_on_node returns ERR_PTR(-EINTR).  But because
that would happen when the process we need to have the driver working
gets killed, I'm not sure it matters.

-- 
   Ed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ