summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorSimon Lindgren <simon@aqwary.com>2014-08-26 19:13:24 (GMT)
committerWolfram Sang <wsa@the-dreams.de>2014-09-02 12:29:20 (GMT)
commit6721f28a26efd6368497abbdef5dcfc59608d899 (patch)
treeab605a2947c61973e2c3b30a14deb74ce7141239 /fs/btrfs
parent0ce4bc1dbdd911ae1763e2d4ff36bd1b214a59f7 (diff)
downloadlinux-6721f28a26efd6368497abbdef5dcfc59608d899.tar.xz
i2c: at91: Fix a race condition during signal handling in at91_do_twi_xfer.
There is a race condition in at91_do_twi_xfer when signals arrive. If a signal is recieved while waiting for a transfer to complete wait_for_completion_interruptible_timeout() will return -ERESTARTSYS. This is not handled correctly resulting in interrupts still being enabled and a transfer being in flight when we return. Symptoms include a range of oopses and bus lockups. Oopses can happen when the transfer completes because the interrupt handler will corrupt the stack. If a new transfer is started before the interrupt fires the controller will start a new transfer in the middle of the old one, resulting in confused slaves and a locked bus. To avoid this, use wait_for_completion_io_timeout instead so that we don't have to deal with gracefully shutting down the transfer and disabling the interrupts. Signed-off-by: Simon Lindgren <simon@aqwary.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
Diffstat (limited to 'fs/btrfs')
0 files changed, 0 insertions, 0 deletions