On 10/20/09, Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote: > On 10/20/09, Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote: >> >> This ultimately calls pppoe_flush_dev() and this function >> takes care of taking appropriate sock_locks() on each sockets ? >> > This hold and lock socks but set pppoe_dev to null as well. I'll back > later. And i need to reread the code. > from a second glance we have a race with pppoe_connect (err_put label) and pppoe_flush_dev. Connect lock socket but while flushing we may dev_put with null device. So as Eric pointed early the error path is racy and should be protected with flush_lock. Note that while flushing pppoe we may do dev_put without socket locked. This should be the corner case. Michal could you add this lock in pppoe_connect (i cant do this at moment). -- To unsubscribe from this list: send the line "unsubscribe linux-ppp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html