avoid linux 2.6.14 was: Re: 9.3.2b1 errno2result.c:109: unexpected error: unable to convert errno to isc_result: 14: Bad address

Danny Mayer mayer at ntp.isc.org
Sat Nov 5 03:24:02 UTC 2005


Stefan Schmidt wrote:
> On Thu, Nov 03, 2005 at 09:08:21PM -0500, Danny Mayer wrote:
> 
>>>diff --git a/net/core/datagram.c b/net/core/datagram.c
>>>--- a/net/core/datagram.c
>>>+++ b/net/core/datagram.c
>>>@@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct
>>> {
>>>        int i, err, fraglen, end = 0;
>>>        struct sk_buff *next = skb_shinfo(skb)->frag_list;
>>>+
>>>+       if (!len)
>>>+               return 0;
>>>+
>>> next_skb:
>>>        fraglen = skb_headlen(skb);
>>>        i = -1;
>>
>>If len is an integer signed or unsigned, that's improper code. I can't
>>imagine why it would not be written as:
>>
>>	if (len <= 0)
>>		return 0;
>>
> 
> 
> You'll need to ask Herbert Xu <herbert at gondor.apana.org.au> about it for he
> wrote this patch. All i know is that it fixes this kernel bug and that this
> integer in particular is very unlikely to be < 0 as it represents the udp
> packets payload length, but i can see your point here.
> 

Using if (len <= 0) is safe even if len cannot be <0.

> 
>>I would stay away from any software and O/S that considered good coding
>>practice.
> 
> 
> Then this must be why you are using:
> User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
> scnr - that was just too good a draft. ;)
> 

Just because you use mutt? Sorry but the laptop is work-required. :-(

Danny

> 	Stefan



More information about the bind-workers mailing list