Comment 4 for bug 1586418

Revision history for this message
Colin Ian King (colin-king) wrote :

commit 20bafb3d23d108bc0a896eb8b7c1501f4f649b77
Author: Peter Hurley <email address hidden>
Date: Sat Jun 15 10:21:19 2013 -0400

    n_tty: Move buffers into n_tty_data

    Reduce pointer reloading and improve locality-of-reference;
    allocate read_buf and echo_buf within struct n_tty_data.

    Signed-off-by: Peter Hurley <email address hidden>
    Signed-off-by: Greg Kroah-Hartman <email address hidden>

...

@@ -1715,7 +1713,8 @@ static int n_tty_open(struct tty_struct *tty)
 {
        struct n_tty_data *ldata;

- ldata = kzalloc(sizeof(*ldata), GFP_KERNEL);
+ /* Currently a malloc failure here can panic */
+ ldata = vmalloc(sizeof(*ldata));
        if (!ldata)
                goto err;

So I'm hitting a vmalloc failure and as the comment says, a failure there causes a panic. Nice.