aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_synctty.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-07-14 16:13:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-14 16:13:41 -0400
commit252aa9d94a04252046f3a382e6aca1b5c95921d8 (patch)
tree5b265e4ae8011bd99938b2d4da5abac411aa6fc7 /drivers/net/ppp_synctty.c
parent8660c1240ec6016522b882c88751cb4ce40bf0e8 (diff)
Revert "NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines."
This reverts commit adeab1afb7de89555c69aab5ca21300c14af6369. As Alan Cox explained, the TTY layer changes that went recently to get rid of the tty->low_latency stuff fixes this already, and even for -stable it's the ->low_latency changes that should go in to fix this, rather than this patch. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp_synctty.c')
-rw-r--r--drivers/net/ppp_synctty.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index 1b3f75febee1..aa3d39f38e22 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -182,15 +182,13 @@ static DEFINE_RWLOCK(disc_data_lock);
182 182
183static struct syncppp *sp_get(struct tty_struct *tty) 183static struct syncppp *sp_get(struct tty_struct *tty)
184{ 184{
185 unsigned long flags;
186 struct syncppp *ap; 185 struct syncppp *ap;
187 186
188 read_lock_irqsave(&disc_data_lock, flags); 187 read_lock(&disc_data_lock);
189 ap = tty->disc_data; 188 ap = tty->disc_data;
190 if (ap != NULL) 189 if (ap != NULL)
191 atomic_inc(&ap->refcnt); 190 atomic_inc(&ap->refcnt);
192 read_unlock_irqrestore(&disc_data_lock, flags); 191 read_unlock(&disc_data_lock);
193
194 return ap; 192 return ap;
195} 193}
196 194
@@ -264,13 +262,12 @@ ppp_sync_open(struct tty_struct *tty)
264static void 262static void
265ppp_sync_close(struct tty_struct *tty) 263ppp_sync_close(struct tty_struct *tty)
266{ 264{
267 unsigned long flags;
268 struct syncppp *ap; 265 struct syncppp *ap;
269 266
270 write_lock_irqsave(&disc_data_lock, flags); 267 write_lock_irq(&disc_data_lock);
271 ap = tty->disc_data; 268 ap = tty->disc_data;
272 tty->disc_data = NULL; 269 tty->disc_data = NULL;
273 write_unlock_irqrestore(&disc_data_lock, flags); 270 write_unlock_irq(&disc_data_lock);
274 if (!ap) 271 if (!ap)
275 return; 272 return;
276 273