From: Jan Kasprzak <kas@fi.muni.cz>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: [PATCH] drivers/char/mxser.c: Fix reference counting
Date: Mon, 16 Mar 2009 16:48:18 +0100 [thread overview]
Message-ID: <20090316154817.GX7301@fi.muni.cz> (raw)
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" <<
next reply other threads:[~2009-03-16 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 15:48 Jan Kasprzak [this message]
2009-03-16 16:01 ` Jiri Slaby
2009-03-16 16:03 ` Jan Kasprzak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090316154817.GX7301@fi.muni.cz \
--to=kas@fi.muni.cz \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®