lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty's use of file_list_lock and file_move
On 7/11/06, Paulo Marques <pmarques@grupopie.com> wrote:
> Jon Smirl wrote:
> >[...]
> > extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
> > @@ -158,21 +157,21 @@ static struct tty_struct *alloc_tty_stru
> > {
> > struct tty_struct *tty;
> >
> > - tty = kmalloc(sizeof(struct tty_struct), GFP_KERNEL);
> > - if (tty)
> > - memset(tty, 0, sizeof(struct tty_struct));
> > + tty = kmalloc(sizeof(*tty), GFP_KERNEL);
> ^^^^^^^
> kzalloc?

It needs to be cleaned up. Right now it clears the struct twice before
using it, once in tty_alloc and another in tty_init.

> I don't know this code very well, so you might be actually changing the
> initialization here. On the other hand, this might be just a simple bug...


--
Jon Smirl
jonsmirl@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 15:45    [W:0.073 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site