mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* fix oops in driver/serial/core.c
@ 2003-06-08 13:19 hugang
  2003-06-09  6:18 ` [PATCH] " Milton Miller
  0 siblings, 1 reply; 2+ messages in thread
From: hugang @ 2003-06-08 13:19 UTC (permalink / raw)
  To: linux-kernel

Hell all:

Fix bug in 2.5.70.

--- linux-2.5.70/drivers/serial/core.c.old	Sun Jun  8 21:11:49 2003
+++ linux-2.5.70/drivers/serial/core.c	Sun Jun  8 21:12:06 2003
@@ -2189,11 +2189,11 @@
 void uart_unregister_driver(struct uart_driver *drv)
 {
 	struct tty_driver *p = drv->tty_driver;
-	drv->tty_driver = NULL;
 	tty_unregister_driver(p);
 	kfree(drv->state);
 	kfree(drv->tty_driver->termios);
 	kfree(drv->tty_driver);
+	drv->tty_driver = NULL;
 }
 
 struct tty_driver *uart_console_device(struct console *co, int *index)


-- 
Hu Gang / Steve
Email        : huagng@soulinfo.com, steve@soulinfo.com
GPG FinePrint: 4099 3F1D AE01 1817 68F7  D499 A6C2 C418 86C8 610E
http://soulinfo.com/~hugang/HuGang.asc
ICQ#         : 205800361
Registered Linux User : 204016

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix oops in driver/serial/core.c
  2003-06-08 13:19 fix oops in driver/serial/core.c hugang
@ 2003-06-09  6:18 ` Milton Miller
  0 siblings, 0 replies; 2+ messages in thread
From: Milton Miller @ 2003-06-09  6:18 UTC (permalink / raw)
  To: Hu Gang; +Cc: linux-kernel

How about the following patch instead, which preserves the reordering
done by Al Viro?

===== drivers/serial/core.c 1.62 vs edited =====
--- 1.62/drivers/serial/core.c	Fri Jun  6 01:36:47 2003
+++ edited/drivers/serial/core.c	Sun Jun  8 20:59:44 2003
@@ -2192,8 +2192,8 @@
 	drv->tty_driver = NULL;
 	tty_unregister_driver(p);
 	kfree(drv->state);
-	kfree(drv->tty_driver->termios);
-	kfree(drv->tty_driver);
+	kfree(p->termios);
+	kfree(p);
 }
 
 struct tty_driver *uart_console_device(struct console *co, int *index)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-09  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-08 13:19 fix oops in driver/serial/core.c hugang
2003-06-09  6:18 ` [PATCH] " Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®