Re: [BUG] Suspected bug in getpeername and getsockname

From: David S. Miller (davem@redhat.com)
Date: Thu Jan 17 2002 - 18:38:59 EST


   From: "Balbir Singh" <balbir_soni@hotmail.com>
   Date: Thu, 17 Jan 2002 15:35:59 -0800

   
>From: "David S. Miller" <davem@redhat.com>
>Optimizing error cases never bears any fruit.
   
   In this case, I certainly think it does. Could u give a
   case as to why doing this would be harmful? I think the
   only issue can be maintainability and doing the change
   cleanly. But I think u are a good maintainer and will
   accept the changes only if they are properly fixed.
   Right :-)

If I give up the maintainability (ie. make the code more error prone
due to duplication) I better be getting something back.

Can the user eat up more than a scheduling quantum because of the
work done by ->getname()? I certainly don't think you can prove
this.

Since the user can't, there is no real gain from the change, only
negative maintainability aspects. (and perhaps that it would make
you happy)

It certainly isn't work the long discussion we're having about it,
that is for sure.

You want this to make your broken getname() protocol semantics work
and I'd like you to address that instead. I get the feeling that
you've designed this weird behavior and that it is not specified in
any standard anyways that your protocol must behave in this way. I
suggest you change it to work without the user length being
available.

Franks a lot,
David S. Miller
davem@redhat.com
-
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 : Wed Jan 23 2002 - 21:00:23 EST