Messages in this thread | | | From | Rasmus Villemoes <> | Subject | Re: incoming | Date | Thu, 10 Sep 2015 08:47:17 +0200 |
| |
On Thu, Sep 10 2015, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> The VERY FIRST conversion patch I looked at was buggy. That makes me > angry. The whole *AND*ONLY* point of this whole thing was to get rid > of bugs, and be a obviously safe interface, and then the first > conversion patch proves it wrong. > > Let me show you: > > if (isdigit(*str)) { > - io_tlb_nslabs = simple_strtoul(str, &str, 0); > + str += parse_integer(str, 0, &io_tlb_nslabs); > > and obviously nobody spent even a *second* asking themselves "what if > parse_integer returns an error".
[This is going to sound awfully self-glorifying. Oh well.] I did point that out in another instance (memparse), which I think then got somewhat fixed in a later version. Since Alexey and I seemed to disagree on what guiding principles to use when doing the conversions and a number of other points, I didn't have the energy to go through the entire series, and the discussion died out.
http://thread.gmane.org/gmane.linux.kernel/1942623/focus=1944193
> I liked the automatic type-based templating it does, but I *don't* > like the breakage that seems to be inevitable in any large-scale > conversion from a previously used historical interface.
My words exactly.
Rasmus
| |