[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191206104823.36998638@canb.auug.org.au>
Date: Fri, 6 Dec 2019 10:48:23 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, linux-next@...r.kernel.org,
linux-kernel@...r.kernel.org, sd@...asysnail.net,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: linux-next: build warning after merge of the net tree
Hi Dave,
On Thu, 05 Dec 2019 14:57:39 -0800 (PST) David Miller <davem@...emloft.net> wrote:
>
> I think it is a false positive as well. It looks like the compiler
> has trouble seeing through ptr error guards.
>
> In the new code the compiler can only see that the return value in the
> error case is non-zero, not necessarily that it is < 0 which is the
> guard against uninitialized accesses of 'obj'.
>
> It will satisfy this property, but through the various casts and
> implicit demotions, this information is lost on the compiler.
>
> My compiler didn't emit this warning FWIW.
>
> gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2)
>
> I'm unsure how to handle this, setting 'n' to explicitly be NULL
> is bogus because the compiler now will think that a NULL deref
> happens since the guard isn't guarding the existing assignment.
Yeah, not much we can do.
x86_64-linux-gnu-gcc (Debian 9.2.1-19) 9.2.1 20191109
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists