netdev
[Top] [All Lists]

[IPV4] Make loopback idev stick around

To: "David S. Miller" <davem@xxxxxxxxxxxxx>, YOSHIFUJI Hideaki <yoshfuji@xxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
Subject: [IPV4] Make loopback idev stick around
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 Feb 2005 16:30:30 +1100
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
Hi:

As it is when loopback_dev loses all of its IPv4 addresses its
corresponding idev will be destroyed.  Unfortunately as of last
August route.c relies on the loopback idev to kill references
to other idev objects.

The end result is that when you do ip a f dev lo, unregistering
other devices will hang until those dst objects referring to
their idev objects die of natural causes.  Of course this may
never happen if the processes holding those references get
dead-locked by invoking an operation that takes the RTNL.

A simple solution is to make sure that loopback's idev sticks
around all the time.

Incidentally this also fixes the setting of some flags on the
loopback idev object as currently the code that does it won't
be called if you add the addresses to lo after bring it up.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: idev-1
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>