public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: gianluca <gianluca@sottospazio.it>
To: linux-serial@vger.kernel.org
Subject: question about tty_port.c
Date: Fri, 5 Jul 2013 08:58:34 +0200	[thread overview]
Message-ID: <20130705065834.GA3548@debian.seek.priv> (raw)

Hi,

I was getting kernel panics using an rfcomm bluetooth serial port with the
kernel 3.10 and searching the web I stumbled upon the following issue, which
seems to be exactly the problem I have:

http://marc.info/?t=136868685500006&r=1&w=2

So I went to look tty_port.c to understand the lifetime of the tty_port objects
and fix rfcomm/tty.c

This is unrelated to the issue I have but it seems to me that in
tty_port_tty_hangup we could leak a tty object:

        if (tty && (!check_clocal || !C_CLOCAL(tty))) {
                tty_hangup(tty);
                tty_kref_put(tty);
        }

If the first condition is true (tty != NULL) and the second is false we never
call tty_kref_put.

However I could be wrong and in this case I apologize.

I don't understand the inner working of this code, I was just trying to fix
the oops I get, without luck unfortunately.

Ciao,

Gianluca

                 reply	other threads:[~2013-07-05  6:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20130705065834.GA3548@debian.seek.priv \
    --to=gianluca@sottospazio.it \
    --cc=linux-serial@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