Re: [CHECKER] question about functions that can fail

From: Andreas Dilger (adilger@turbolinux.com)
Date: Mon Mar 19 2001 - 17:23:54 EST


Dawson writes:
> right now we are trying to derive which functions can "reasonably" fail
> by examining all call sites and recording the number of times functions
> are checked vs not checked.

First of all, thanks for this interesting work you are doing. Pre-emptive
bug squashing is great. Probably saved many man-years of grief for people
who are having intermittent problems, or have uncommon hardware/configuration.

> I've included the most egregious cases of check/not checked:
>
> parse_options : 14 : 1:

It appears you are not making a distinction between static functions and
global functions. The parse_options function is local to ext2, but since
many filesystem writers look at ext2 for guidance, they often have functions
with similar names. It looks like parse_options is one of the common ones.

That said, I'm guessing the 1 time the return value isn't checked is a bug.
It appears to be in fs/proc/inode.c, and the parse_options() there _does_
return 1 on error (unknown mount option), so we _should_ probably fail
mounting /proc in that case.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:13 EST