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]
Date:   Thu, 20 Jul 2017 13:05:19 +0200
From:   "Wolf Entwicklungen" <Marcus.Wolf@...f-Entwicklungen.de>
To:     "Joseph Wright" <rjosephwright@...il.com>
Cc:     gregkh@...uxfoundation.org, linux@...f-entwicklungen.de,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        "Joseph Wright" <rjosephwright@...il.com>
Subject: Re: [PATCH 2/2] Staging: pi433: check error after kthread_run()

Reviewed-by: Marcus Wolf <linux@...f-entwicklungen.de>
Tested-by: Marcus Wolf <linux@...f-entwicklungen.de>

Am So, 16.07.2017, 16:48 schrieb Joseph Wright:
> Error should be checked with IS_ERR after calling kthread_run()
> instead of comparing the returned pointer to an int.
>
> Found by sparse warning:
>
> incompatible types for operation (<)
>     left side has type struct task_struct *tx_task_struct
>     right side has type int
>
> Signed-off-by: Joseph Wright <rjosephwright@...il.com>
> ---
>  drivers/staging/pi433/pi433_if.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
> index 46461b4..4f724a5 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -1152,7 +1152,7 @@ static int pi433_probe(struct spi_device *spi)
>  	device->tx_task_struct = kthread_run(pi433_tx_thread,
>  					     device,
>  					     "pi433_tx_task");
> -	if (device->tx_task_struct < 0)
> +	if (IS_ERR(device->tx_task_struct))
>  	{
>  		dev_dbg(device->dev, "start of send thread failed");
>  		goto send_thread_failed;
> --
> 2.9.3
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ