• Maxime Chevallier's avatar
    net: ipconfig: Release the rtnl_lock while waiting for carrier · ee046d9a
    Maxime Chevallier authored
    While waiting for a carrier to come on one of the netdevices, some
    devices will require to take the rtnl lock at some point to fully
    initialize all parts of the link.
    
    That's the case for SFP, where the rtnl is taken when a module gets
    detected. This prevents mounting an NFS rootfs over an SFP link.
    
    This means that while ipconfig waits for carriers to be detected, no SFP
    modules can be detected in the meantime, it's only detected after
    ipconfig times out.
    
    This commit releases the rtnl_lock while waiting for the carrier to come
    up, and re-takes it to check the for the init device and carrier status.
    Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ee046d9a
ipconfig.c 43 KB