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: <20170613104410.piy7o3oxiahtuqjx@ltop.local>
Date:   Tue, 13 Jun 2017 12:44:12 +0200
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Charlemagne Lasse <charlemagnelasse@...il.com>
Cc:     linux-sparse@...r.kernel.org, kernelnewbies@...nelnewbies.org,
        linux-kernel@...r.kernel.org,
        Jeff Layton <jlayton@...marydata.com>,
        Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: ./include/linux/err.h:35:16: warning: dereference of noderef
 expression

On Tue, Jun 13, 2017 at 11:55:26AM +0200, Charlemagne Lasse wrote:
> Hi,
> 
> I have following code which generates a warning when compiling with "make C=1".
> 
> ~~~~~~~
> struct task_struct *kthread;
> kthread = kthread_create(xxxxx, yyyyy, "zzzzz");
> if (IS_ERR(kthread)) {
> ~~~~~~~
> 
> The warning is
> 
>     ./include/linux/err.h:35:16: warning: dereference of noderef expression
> 
> And disappears when I remove the IS_ERR. How do I correctly work
> around this incorrect warning?
> 
> Btw. I am using Debian stretch amd64. It seems like this is related to
> the __force used in the parameter list of IS_ERR. Removing it also
> removes the warning.

The warning is indeed related to '__force' but it should be
the other way around.
Anyway, by just reading your three lines of code, you shouldn't
receive this warning, with or without the __force.
 
> If it is fixed in sparse's git then when will there be a new release of it?

I can't reproduce your problem even on a three years old version
of sparse (more exactly git version d917662d5 of sparse, anything
older has build problems with half-recent kernels).

The pre-processed version of your file could be interesting
as well as the output of the make command but with the 'V=1'
option added.
 

Regards,
-- Luc Van Oostenryck

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ