summaryrefslogtreecommitdiffstats
path: root/samples/uhid
diff options
context:
space:
mode:
authorFederico Vaga <federico.vaga@cern.ch>2014-06-26 09:46:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 17:02:15 -0700
commit968d04e8de53789ccdb9f74413eb497f155d266b (patch)
treeee8556805aa1573c7ed660896cb027945d3901df /samples/uhid
parentb86e1926be37c77deeb176466d98678feab04066 (diff)
downloadlinux-968d04e8de53789ccdb9f74413eb497f155d266b.tar.bz2
ipoctal: protect only the real critical section
In some conditions (echo or particular sequence of special characters), on buffer push, the tty layer calls the write operation while we are holding the spinlock. This means deadlock within the same process on kernels version < 3.12. It seems not a problem on recent kernel, but the patch still valid as locking optimization. The protected variables by the spinlock are: xmit_buf, nb_bytes, pointer_read and pointer_write. So, this patch reduces the locked area in the IRQ handler only to these variables. Most of the code inside the locked area in the IRQ handler is not protected elsewhere; it means that it is not protected at all. Signed-off-by: Federico Vaga <federico.vaga@cern.ch> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples/uhid')
0 files changed, 0 insertions, 0 deletions