lkml.org 
[lkml]   [2017]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 0/3] Re: tty contention resulting from tty_open_by_device export
On Tue, Jul 18, 2017 at 03:26:37PM +0300, Dan Carpenter wrote:
> > + if (tty) {
> > + /* drop kref from tty_driver_lookup_tty() */
> > + tty_kref_put(tty);
> > + tty = ERR_PTR(-EBUSY);
> > + } else { /* tty_init_dev returns tty with the tty_lock held */
> > + tty = tty_init_dev(driver, index);
> > + tty_port_set_kopened(tty->port, 1);
> ^^^^^^^^^
>
> tty_init_dev() can fail leading to an error pointer dereference here.

Thanks very much. I will check for error pointer here.

Okash

\
 
 \ /
  Last update: 2017-07-18 21:24    [W:0.080 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site