Re: [PATCH] r8169: fix a race between PCI probe and dev_open

2007-02-01 Thread Jeff Garzik
Linus Torvalds wrote: On Wed, 31 Jan 2007, Francois Romieu wrote: Call chain: -> rtl8169_init_one -> register_netdev (dev_open starts to race...) -> rtl8169_init_phy -> rtl8169_set_speed -> tp->set_speed -> mod_timer(&tp->timer, ...) (if netif_run

Re: [PATCH] r8169: fix a race between PCI probe and dev_open

2007-02-01 Thread Francois Romieu
Herbert Xu <[EMAIL PROTECTED]> : [...] > Normally register_netdev should be the very last thing in a probe routine. Yes. I did not feel safe changing it before 2.6.20. -- Ueimor - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More

Re: [PATCH] r8169: fix a race between PCI probe and dev_open

2007-02-01 Thread Francois Romieu
Linus Torvalds <[EMAIL PROTECTED]> : [...] > Doesn't this basically mean that *any* use of "rtl8169_set_speed()" is > buggy? The second use of rtl8169_set_speed is in the change_mtu handler which performs a complete down/cycle after a release of the timer. It's still ugly though. If the current b

Re: [PATCH] r8169: fix a race between PCI probe and dev_open

2007-01-31 Thread Herbert Xu
Francois Romieu <[EMAIL PROTECTED]> wrote: > > rtl8169_init_phy is only used on rtl8169_init_one so it's fine to never > ask it to activate the timer: the racing dev->open will do it anyway. Does rtl8169_init_phy need to occur after register_netdev? Normally register_netdev should be the very las

Re: [PATCH] r8169: fix a race between PCI probe and dev_open

2007-01-31 Thread Linus Torvalds
On Wed, 31 Jan 2007, Francois Romieu wrote: > Call chain: > -> rtl8169_init_one >-> register_netdev (dev_open starts to race...) >-> rtl8169_init_phy > -> rtl8169_set_speed > -> tp->set_speed > -> mod_timer(&tp->timer, ...) (if netif_running() is

[PATCH] r8169: fix a race between PCI probe and dev_open

2007-01-31 Thread Francois Romieu
Call chain: -> rtl8169_init_one -> register_netdev (dev_open starts to race...) -> rtl8169_init_phy -> rtl8169_set_speed -> tp->set_speed -> mod_timer(&tp->timer, ...) (if netif_running() is true) As netif_running() is true just before dev->open() is