[patch] possible deadlock in cosa driver

Marcelo Tosatti (marcelo@conectiva.com.br)
Tue, 25 May 1999 14:54:40 -0300 (EST)


cosa_sppp_open was locking a spinlock without unlocking it under a
condition.

--- cosa.c.orig Mon May 24 16:53:26 1999
+++ cosa.c Tue May 25 14:49:40 1999
@@ -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
@@ -598,6 +601,7 @@
if (chan->usage != 0) {
printk(KERN_WARNING "%s: sppp_open called with usage count %d\n",
chan->name, chan->usage);
+ spin_unlock_irqsave(&chan->cosa->lock, flags);
return -EBUSY;
}
chan->setup_rx = sppp_setup_rx;

- Marcelo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/