patch-2.3.4 linux/drivers/net/cosa.c
Next file: linux/drivers/net/eexpress.c
Previous file: linux/drivers/net/arcnet.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Sun May 30 10:18:20 1999
- Orig file:
v2.3.3/linux/drivers/net/cosa.c
- Orig date:
Mon May 17 09:55:22 1999
diff -u --recursive --new-file v2.3.3/linux/drivers/net/cosa.c linux/drivers/net/cosa.c
@@ -2,6 +2,9 @@
/*
* Copyright (C) 1995-1997 Jan "Yenya" Kasprzak <kas@fi.muni.cz>
+ *
+ * 5/25/1999 : Marcelo Tosatti <marcelo@conectiva.com.br>
+ * fixed a deadlock in cosa_sppp_open
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -599,6 +602,7 @@
if (chan->usage != 0) {
printk(KERN_WARNING "%s: sppp_open called with usage count %d\n",
chan->name, chan->usage);
+ spin_unlock_irqrestore(&chan->cosa->lock, flags);
return -EBUSY;
}
chan->setup_rx = sppp_setup_rx;
@@ -750,8 +754,8 @@
static void chardev_channel_init(struct channel_data *chan)
{
- chan->rsem = MUTEX;
- chan->wsem = MUTEX;
+ init_MUTEX(&chan->rsem);
+ init_MUTEX(&chan->wsem);
}
static long long cosa_lseek(struct file * file,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)