All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/char/mxser.c: Fix reference counting
@ 2009-03-16 15:48 Jan Kasprzak
  2009-03-16 16:01 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kasprzak @ 2009-03-16 15:48 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, alan

	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"  <<

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

* Re: [PATCH] drivers/char/mxser.c: Fix reference counting
  2009-03-16 15:48 [PATCH] drivers/char/mxser.c: Fix reference counting Jan Kasprzak
@ 2009-03-16 16:01 ` Jiri Slaby
  2009-03-16 16:03   ` Jan Kasprzak
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2009-03-16 16:01 UTC (permalink / raw)
  To: Jan Kasprzak; +Cc: linux-kernel, alan

On 16.3.2009 16:48, Jan Kasprzak wrote:
> 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.

I was faster :P:
http://lkml.org/lkml/2009/3/16/159

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

* Re: [PATCH] drivers/char/mxser.c: Fix reference counting
  2009-03-16 16:01 ` Jiri Slaby
@ 2009-03-16 16:03   ` Jan Kasprzak
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kasprzak @ 2009-03-16 16:03 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, alan

Jiri Slaby wrote:
: On 16.3.2009 16:48, Jan Kasprzak wrote:
: >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.
: 
: I was faster :P:
: http://lkml.org/lkml/2009/3/16/159

	OK, sorry for not checking out lkml first :-)

-Yenya

-- 
| 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"  <<

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

end of thread, other threads:[~2009-03-16 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-16 15:48 [PATCH] drivers/char/mxser.c: Fix reference counting Jan Kasprzak
2009-03-16 16:01 ` Jiri Slaby
2009-03-16 16:03   ` Jan Kasprzak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.