[PATCH] ppp_generic.c: last_channel_index

Brian Kuschak (brian.kuschak@skystream.com)
Sat, 14 Jul 2001 12:30:46 -0700


I found that after I repeatedly opened and closed PPP connections, I would
get an Oops. PPP daemon would try to allocate strange PPP interface numbers
(ppp12, for example) and other sanity checks would fail (kind != INTERFACE
|| CHANNEL)

The last_channel_index wasn't being cleaned up when the channel was closed,
leading to these problems the next time a PPP channel was opened. This
patch fixes the problem for me.

using ppp-2.4.0, patch against: linux-2.4.6

Regards,
Brian

*** ppp_generic.c Sun Apr 22 09:46:40 2001
--- /home/brian/linux/drivers/net/ppp_generic.c Fri Jul 13 18:38:30 2001
***************
*** 1871,1876 ****
--- 1796,1802 ----
ppp_disconnect_channel(pch);
wake_up_interruptible(&pch->file.rwait);
spin_lock_bh(&all_channels_lock);
+ last_channel_index--;
list_del(&pch->file.list);
spin_unlock_bh(&all_channels_lock);
if (atomic_dec_and_test(&pch->file.refcnt))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/