public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Benjamin ZORES <benjamin.zores@alcatel-lucent•fr>
To: netdev@vger•kernel.org
Subject: Re: [PATCH] Fix infinite retry loop in IP-Config
Date: Thu, 29 Jan 2009 16:33:35 +0100	[thread overview]
Message-ID: <4981CC4F.6050609@alcatel-lucent.fr> (raw)
In-Reply-To: <49804AAF.7020702@alcatel-lucent.fr>

Benjamin ZORES a écrit :
> Jarek Poplawski a écrit :
>> On 28-01-2009 10:07, Benjamin ZORES wrote:
>>  
>>> Hi,
>>>
>>> The attached patch fixes some bug with ip-config max retry number.
>>> In ip_auto_config(), kernel tries to retrieve IP configuration forever
>>> in case of NFS root and some specific amount of time otherwise.
>>>
>>> The problem is that, in case of error, the code jump to the 
>>> try_try_again
>>> goto statement, that reassigns the retry number counter, which 
>>> obviously
>>> leads to an infinite loop if IP config fails.
>>>
>>> The attached patch corrects this behavior.
>>> Hope one can push it to mainstream kernel tree.
>>>
>>> Ben
>>>
>>> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
>>> index 42a0f3d..4911b81 100644
>>> --- a/net/ipv4/ipconfig.c
>>> +++ b/net/ipv4/ipconfig.c
>>> @@ -1268,6 +1268,7 @@ __be32 __init root_nfs_parse_addr(char *name)
>>>  static int __init ip_auto_config(void)
>>>  {
>>>      __be32 addr;
>>> +     int retries = CONF_OPEN_RETRIES;
>>>     
>>  
>> Doesn't it need "#ifdef IPCONFIG_DYNAMIC" to prevent a compiler
>> warning? I guess you could add a "Signed-off-by:" line BTW.
>>   
> You're perfectly right about this.
> Attached an updated version of the patch.
Any chance of having it merged ?

Ben

  reply	other threads:[~2009-01-29 15:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  9:07 [PATCH] Fix infinite retry loop in IP-Config Benjamin ZORES
2009-01-28 10:52 ` Jarek Poplawski
2009-01-28 12:08   ` Benjamin ZORES
2009-01-29 15:33     ` Benjamin ZORES [this message]
2009-01-29 20:39       ` David Miller
2009-01-30  0:19     ` David Miller
2009-01-30  8:25       ` Benjamin ZORES

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4981CC4F.6050609@alcatel-lucent.fr \
    --to=benjamin.zores@alcatel-lucent$(echo .)fr \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox