]> git.baikalelectronics.ru Git - kernel.git/commit
tty: hvc_dcc: Fix duplicate character inputs
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 26 Oct 2011 02:19:43 +0000 (19:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Nov 2011 20:02:13 +0000 (12:02 -0800)
commit0813d5776f8753f5566819ec8fa40dcc542c163b
tree66582813076b24419d628ab083c8f15c0cc7de37
parent2705d1190b735850c155512ba69f17382b3671aa
tty: hvc_dcc: Fix duplicate character inputs

Reading from the DCC grabs a character from the buffer and
clears the status bit. Since this is a context-changing
operation, instructions following the character read that rely on
the status bit being accurate need to be synchronized with an
ISB.

In this case, the status bit check needs to execute after the
character read otherwise we run the risk of reading the character
and checking the status bit before the read can clear the status
bit in the first place. When this happens, the user will see the
same character they typed twice, instead of once.

Add an ISB after the read and the write, so that the status check
is synchronized with the read/write operations.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/hvc/hvc_dcc.c