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
Fri Nov 4 02:08:21 UTC 2005


Stefan Schmidt wrote:
> On Thu, Oct 27, 2005 at 03:52:35PM +0200, Stefan Schmidt wrote:
> 
>>>Running on Debian GNU/Linux unstable with ~40k zones BIND 9.3.2beta1 stopped
>>>answering to udp queries (blocking) and logged the following error message:
>>>Oct 26 16:17:23 ns1 named[2197]: errno2result.c:109: unexpected error:
>>>Oct 26 16:17:23 ns1 named[2197]: unable to convert errno to isc_result: 14:
>>>Bad address
>>>Oct 26 16:17:23 ns1 named[2197]: UDP client handler shutting down due to fatal
>>>receive error: unexpected error
>>
>>I'm suspecting a kernel-bug as i had the problem with 9.3.2b2, 9.3.2b1 and
>>9.3.1 (debian package) and linux kernel 2.6.14-rc5 and 2.6.14-rc4-mm1.
>>I am currently trying with kernel 2.6.13.4 and BIND 9.3.2b2 ran stable for the
>>last 4 hours.
>>I'll keep you informed.
> 
> It was a kernel-bug, it is existent in 2.6.14 and this is the patch:
> 
> 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;
> 
> 
> 	Stefan

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;

I would stay away from any software and O/S that considered good coding
practice.

Danny


More information about the bind-workers mailing list