1. 22 4月, 2015 1 次提交
    • L
      media: remove unused variable that causes a warning · 1d11437f
      Linus Torvalds 提交于
      My 'allmodconfig' build is _almost_ free of warnings, and most of the
      remaining ones are for legacy drivers that just do bad things that I
      can't find it in my black heart to care too much about.  But this one
      was just annoying me:
      
         drivers/media/v4l2-core/videobuf2-core.c:3256:26: warning: unused variable ‘fileio’ [-Wunused-variable]
      
      because commit 0e661006 ("[media] vb2: fix 'UNBALANCED' warnings
      when calling vb2_thread_stop()") removed all users of 'fileio' and
      instead calls "__vb2_cleanup_fileio(q)" to clean up q->fileio.  But the
      now unused 'fileio' variable was left around.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1d11437f
  2. 10 4月, 2015 3 次提交
  3. 09 4月, 2015 1 次提交
  4. 08 4月, 2015 6 次提交
  5. 03 4月, 2015 8 次提交
  6. 02 4月, 2015 1 次提交
  7. 24 3月, 2015 2 次提交
  8. 03 3月, 2015 2 次提交
  9. 02 3月, 2015 1 次提交
    • H
      [media] vb2: fix 'UNBALANCED' warnings when calling vb2_thread_stop() · 0e661006
      Hans Verkuil 提交于
      Stopping the vb2 thread (as used by several DVB devices) can result
      in an 'UNBALANCED' warning such as this:
      
      vb2: counters for queue ffff880407ee9828: UNBALANCED!
      vb2:     setup: 1 start_streaming: 1 stop_streaming: 1
      vb2:     wait_prepare: 249333 wait_finish: 249334
      
      This is due to a race condition between stopping the thread and
      calling vb2_internal_streamoff(). While I have not been able to deduce
      the exact mechanism how this race condition can produce this warning,
      I can see that the way the stream is stopped is likely to lead to a
      race somewhere.
      
      This patch simplifies how this is done by first ensuring that the
      thread is completely stopped before cleaning up the vb2 queue. It
      does that by setting threadio->stop to true, followed by a call to
      vb2_queue_error() which will wake up the thread. The thread sees that
      'stop' is true and it will exit.
      
      The call to kthread_stop() waits until the thread has exited, and only
      then is the queue cleaned up by calling __vb2_cleanup_fileio().
      
      This is a much cleaner sequence and the warning has now disappeared.
      Reported-by: NJurgen Kramer <gtmkramer@xs4all.nl>
      Tested-by: NJurgen Kramer <gtmkramer@xs4all.nl>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v3.18 and up
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      0e661006
  10. 26 2月, 2015 1 次提交
  11. 14 2月, 2015 2 次提交
  12. 27 1月, 2015 1 次提交
  13. 22 1月, 2015 1 次提交
    • H
      [media] vb2: fix vb2_thread_stop race conditions · 6cf11ee6
      Hans Verkuil 提交于
      The locking scheme inside the vb2 thread is unsafe when stopping the
      thread. In particular kthread_stop was called *after* internal data
      structures were cleaned up instead of doing that before. In addition,
      internal vb2 functions were called after threadio->stop was set to
      true and vb2_internal_streamoff was called. This is also not allowed.
      
      All this led to a variety of race conditions and kernel warnings and/or
      oopses.
      
      Fixed by moving the kthread_stop call up before the cleanup takes
      place, and by checking threadio->stop before calling internal vb2
      queuing operations.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v3.16 and up
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      6cf11ee6
  14. 24 12月, 2014 1 次提交
  15. 23 12月, 2014 4 次提交
  16. 17 12月, 2014 1 次提交
  17. 04 12月, 2014 2 次提交
  18. 02 12月, 2014 2 次提交