From Gerd Knorr - this avoids a network deadlock that can happen when the host side of an interface is full when the UML interface is brought up. In this case, SIGIOs will never be delivered since no new data is ever queued to the host side. Signed-off-by: Paolo 'Blaisorblade' Giarrusso --- um-linux-2.4.27-paolo/arch/um/drivers/net_kern.c | 6 ++++++ 1 files changed, 6 insertions(+) diff -puN arch/um/drivers/net_kern.c~ifup-flush arch/um/drivers/net_kern.c --- um-linux-2.4.27/arch/um/drivers/net_kern.c~ifup-flush 2005-04-15 11:13:03.000000000 +0200 +++ um-linux-2.4.27-paolo/arch/um/drivers/net_kern.c 2005-04-15 11:13:03.000000000 +0200 @@ -128,6 +128,12 @@ static int uml_net_open(struct net_devic spin_lock(&opened_lock); list_add(&lp->list, &opened); spin_unlock(&opened_lock); + /* clear buffer - it can happen that the host side of the interface + * is full when we get here. In this case, new data is never queued, + * SIGIOs never arrive, and the net never works. + */ + while((err = uml_net_rx(dev)) > 0) ; + MOD_INC_USE_COUNT; out: spin_unlock(&lp->lock); _