From: Jiri Slaby <jslaby@suse•cz>
To: Sasha Levin <sasha.levin@oracle•com>
Cc: samuel@sortiz•org, davem@davemloft•net,
gregkh@linuxfoundation•org, alan@linux•intel.com,
levinsasha928@gmail•com, davej@redhat•com,
linux-kernel@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: [PATCH] net, TTY: initialize tty->driver_data before usage
Date: Fri, 05 Oct 2012 10:09:04 +0200 [thread overview]
Message-ID: <506E95A0.2020903@suse.cz> (raw)
In-Reply-To: <1349395281-12495-1-git-send-email-sasha.levin@oracle.com>
On 10/05/2012 02:01 AM, Sasha Levin wrote:
> Commit 9c650ffc ("TTY: ircomm_tty, add tty install") split _open() to
> _install() and _open(). It also moved the initialization of driver_data
> out of open(), but never added it to install() - causing a NULL ptr
> deref whenever the driver was used.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle•com>
> ---
> net/irda/ircomm/ircomm_tty.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
> index 95a3a7a..496ce2c 100644
> --- a/net/irda/ircomm/ircomm_tty.c
> +++ b/net/irda/ircomm/ircomm_tty.c
> @@ -421,6 +421,8 @@ static int ircomm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
> hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL);
> }
>
> + tty->driver_data = self;
> +
> return tty_port_install(&self->port, driver, tty);
Yes, a good catch.
Acked-by: Jiri Slaby <jslaby@suse•cz>
thanks,
--
js
suse labs
next prev parent reply other threads:[~2012-10-05 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 0:01 [PATCH] net, TTY: initialize tty->driver_data before usage Sasha Levin
2012-10-05 8:09 ` Jiri Slaby [this message]
2012-10-05 16:25 ` Greg KH
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=506E95A0.2020903@suse.cz \
--to=jslaby@suse$(echo .)cz \
--cc=alan@linux$(echo .)intel.com \
--cc=davej@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=levinsasha928@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=samuel@sortiz$(echo .)org \
--cc=sasha.levin@oracle$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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