summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2014-08-25 13:59:41 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-08-25 20:18:11 -0400
commit4ce97dbf50245227add17c83d87dc838e7ca79d0 (patch)
tree94ba401131a38c716c40d9a24572b469a47f2f9c /drivers/hid
parent39b5552cd5090d4c210d278cd2732f493075f033 (diff)
trace: Fix epoll hang when we race with new entries
Epoll on trace_pipe can sometimes hang in a weird case. If the ring buffer is empty when we set waiters_pending but an event shows up exactly at that moment we can miss being woken up by the ring buffers irq work. Since ring_buffer_empty() is inherently racey we will sometimes think that the buffer is not empty. So we don't get woken up and we don't think there are any events even though there were some ready when we added the watch, which makes us hang. This patch fixes this by making sure that we are actually on the wait list before we set waiters_pending, and add a memory barrier to make sure ring_buffer_empty() is going to be correct. Link: http://lkml.kernel.org/p/1408989581-23727-1-git-send-email-jbacik@fb.com Cc: stable@vger.kernel.org # 3.10+ Cc: Martin Lau <kafai@fb.com> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'drivers/hid')
0 files changed, 0 insertions, 0 deletions