summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorNathael Pajani <nathael.pajani@ed3l.fr>2010-09-02 16:06:16 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-03 17:29:04 -0700
commit6eb68d6f3bf1707d5d816ea9242b7d38f25b942e (patch)
tree8b07c11557ac0b72105d5ecb538fb34335ee10eb /sound
parent336746918299f2ca16b31490655b4ff7c8824c87 (diff)
downloadlinux-stable-6eb68d6f3bf1707d5d816ea9242b7d38f25b942e.tar.gz
linux-stable-6eb68d6f3bf1707d5d816ea9242b7d38f25b942e.tar.bz2
linux-stable-6eb68d6f3bf1707d5d816ea9242b7d38f25b942e.zip
tty: fix tty_line must not be equal to number of allocated tty pointers in tty driver
I found a bug "by chance" in drivers/char/tty_io.c I mean "by chance" because I was just reading the code of the tty_find_polling_driver() to make a new tty_find_by_name() function. In tty_find_polling_driver() the driver actually test "tty_line <= p->num" while num refers to the number of struct tty_struct pointers allocated for the p->ttys (p is a tty_driver), and tty_line is scanned in a tty name, which can be for example ttyS2. Then tty_line equals 2. And if p->num is 2, we have only p->ttys[0] and p->ttys[1], but no p->ttys[2]. This is actually unharmful, for tty_find_polling_driver() is used only in drivers/serial/kgdboc.c, and there's a test over there to find a console with a matching index, which will never happen. This is still a bug anyway. Signed-off-by: Nathael Pajani <nathael.pajani@ed3l.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions