Messages in this thread Patch in this message | | | Date | Mon, 16 Mar 2009 16:48:18 +0100 | From | Jan Kasprzak <> | Subject | [PATCH] drivers/char/mxser.c: Fix reference counting |
| |
Hello,
In drivers/char/mxser.c:mxser_check_modem_status() there is a call to tty_port_tty_get without a corresponding tty_put() call. This causes the device to return -EIO on the second open(2) call.
Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> --- drivers/char/mxser.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 402c9f2..de6f565 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -848,6 +848,7 @@ static void mxser_check_modem_status(struct tty_struct *tty, } } } + tty_kref_put(tty); } static int mxser_startup(struct tty_struct *tty) -- 1.5.3.3 -- | Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> | | GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E | | http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ | >> If you find yourself arguing with Alan Cox, you’re _probably_ wrong. << >> --James Morris in "How and Why You Should Become a Kernel Hacker" << -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |