projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acf673a
)
mkiss: Fix use after free in mkiss_close().
author
David Miller
<davem@davemloft.net>
Thu, 17 Dec 2015 21:05:49 +0000
(16:05 -0500)
committer
David S. Miller
<davem@davemloft.net>
Fri, 18 Dec 2015 21:03:03 +0000
(16:03 -0500)
Need to do the unregister_device() after all references to the driver
private have been done.
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hamradio/mkiss.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/hamradio/mkiss.c
b/drivers/net/hamradio/mkiss.c
index 216bfd350169a9da723035876d152e89b17c8432..0b72b9de520721fee48d3557b817452e2830c613 100644
(file)
--- a/
drivers/net/hamradio/mkiss.c
+++ b/
drivers/net/hamradio/mkiss.c
@@
-798,13
+798,13
@@
static void mkiss_close(struct tty_struct *tty)
if (!atomic_dec_and_test(&ax->refcnt))
down(&ax->dead_sem);
- unregister_netdev(ax->dev);
-
/* Free all AX25 frame buffers. */
kfree(ax->rbuff);
kfree(ax->xbuff);
ax->tty = NULL;
+
+ unregister_netdev(ax->dev);
}
/* Perform I/O control on an active ax25 channel. */