diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 6a56ae4f7725..0bfc7af68917 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -2454,6 +2454,7 @@ static void __do_SAK(void *arg) | |||
2454 | int i; | 2454 | int i; |
2455 | struct file *filp; | 2455 | struct file *filp; |
2456 | struct tty_ldisc *disc; | 2456 | struct tty_ldisc *disc; |
2457 | struct fdtable *fdt; | ||
2457 | 2458 | ||
2458 | if (!tty) | 2459 | if (!tty) |
2459 | return; | 2460 | return; |
@@ -2480,7 +2481,8 @@ static void __do_SAK(void *arg) | |||
2480 | task_lock(p); | 2481 | task_lock(p); |
2481 | if (p->files) { | 2482 | if (p->files) { |
2482 | spin_lock(&p->files->file_lock); | 2483 | spin_lock(&p->files->file_lock); |
2483 | for (i=0; i < p->files->max_fds; i++) { | 2484 | fdt = files_fdtable(p->files); |
2485 | for (i=0; i < fdt->max_fds; i++) { | ||
2484 | filp = fcheck_files(p->files, i); | 2486 | filp = fcheck_files(p->files, i); |
2485 | if (!filp) | 2487 | if (!filp) |
2486 | continue; | 2488 | continue; |