Re: [PATCH] mm: hugetlb: checking for IS_ERR() instead of NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 04, 2021 at 10:14:42AM -0400, Nigel Christian wrote:
> On Fri, Jun 04, 2021 at 04:34:00PM +0300, Dan Carpenter wrote:
> > On Wed, Jun 02, 2021 at 05:47:52PM +0300, Dan Carpenter wrote:
> > > On Tue, Jun 01, 2021 at 11:50:06PM +0300, Dan Carpenter wrote:
> > > > On Tue, Jun 01, 2021 at 10:51:23PM +0300, Dan Carpenter wrote:
> > > > > The other thing which might be interesting is if you pass a NULL
> > > > > to IS_ERR() and then dereference the NULL then print a warning about
> > > > > that.  This has a lot of overlaps with some of my existing checks, but
> > > > > it's still a new idea so it belongs in a separate check.  It's fine and
> > > > > good even if one bug triggers a lot of different warnings.  I'll write
> > > > > that, hang on, brb.
> > > > 
> > > > 100% untested.  :)  I'll test it tonight.
> > > > 
> > > 
> > 
> > I also added a check for:
> > 
> > 	if (is_impossible_path())
> > 		return;
> > 
> > to silence some of the false positives.  But the results are all still
> > false positives.  They're "high quality" false positives, because often
> > the code looks buggy.  I think that someone went through and fixed all
> > the real bugs with this.
> 
> Double positives are good. Glad the bugs are getting fixed!
> Back to hunting for deadcode. That seems to be the lowest
> hanging fruit for me at the momemnt. (-_-)

I really doubt you're going to find much dead code worth fixing unless
you're looking at defines.  Dead code is pretty easy to fix so it's been
picked over pretty well at this point.

regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux