1. 11 Mar, 2021 2 commits
    • Maxim Mikityanskiy's avatar
      media: usbtv: Fix deadlock on suspend · 8a7e27fd
      Maxim Mikityanskiy authored
      usbtv doesn't support power management, so on system suspend the
      .disconnect callback of the driver is called. The teardown sequence
      includes a call to snd_card_free. Its implementation waits until the
      refcount of the sound card device drops to zero, however, if its file is
      open, snd_card_file_add takes a reference, which can't be dropped during
      the suspend, because the userspace processes are already frozen at this
      point. snd_card_free waits for completion forever, leading to a hang on
      suspend.
      
      This commit fixes this deadlock condition by replacing snd_card_free
      with snd_card_free_when_closed, that doesn't wait until all references
      are released, allowing suspend to progress.
      
      Fixes: 63ddf68d ("[media] usbtv: add audio support")
      Signed-off-by: default avatarMaxim Mikityanskiy <maxtram95@gmail.com>
      Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      8a7e27fd
    • Hans Verkuil's avatar
      media: rc: compile rc-cec.c into rc-core · f09f9f93
      Hans Verkuil authored
      The rc-cec keymap is unusual in that it can't be built as a module,
      instead it is registered directly in rc-main.c if CONFIG_MEDIA_CEC_RC
      is set. This is because it can be called from drm_dp_cec_set_edid() via
      cec_register_adapter() in an asynchronous context, and it is not
      allowed to use request_module() to load rc-cec.ko in that case. Trying to
      do so results in a 'WARN_ON_ONCE(wait && current_is_async())'.
      
      Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set, we
      just compile this keymap into the rc-core module and never as a
      separate module.
      Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
      Fixes: 2c6d1fff (drm: add support for DisplayPort CEC-Tunneling-over-AUX)
      Reported-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      f09f9f93
  2. 06 Mar, 2021 4 commits
  3. 05 Mar, 2021 33 commits
  4. 04 Mar, 2021 1 commit
    • Jens Axboe's avatar
      kernel: provide create_io_thread() helper · cc440e87
      Jens Axboe authored
      Provide a generic helper for setting up an io_uring worker. Returns a
      task_struct so that the caller can do whatever setup is needed, then call
      wake_up_new_task() to kick it into gear.
      
      Add a kernel_clone_args member, io_thread, which tells copy_process() to
      mark the task with PF_IO_WORKER.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cc440e87