1. 11 12月, 2019 8 次提交
  2. 25 11月, 2019 1 次提交
  3. 22 11月, 2019 2 次提交
  4. 15 11月, 2019 2 次提交
  5. 14 11月, 2019 1 次提交
  6. 13 11月, 2019 1 次提交
    • H
      ALSA: usb-audio: not submit urb for stopped endpoint · 52869931
      Henry Lin 提交于
      While output urb's snd_complete_urb() is executing, calling
      prepare_outbound_urb() may cause endpoint stopped before
      prepare_outbound_urb() returns and result in next urb submitted
      to stopped endpoint. usb-audio driver cannot re-use it afterwards as
      the urb is still hold by usb stack.
      
      This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again
      to let snd_complete_urb() know the endpoint already stopped and does not
      submit next urb. Below kind of error will be fixed:
      
      [  213.153103] usb 1-2: timeout: still 1 active urbs on EP #1
      [  213.164121] usb 1-2: cannot submit urb 0, error -16: unknown error
      Signed-off-by: NHenry Lin <henryl@nvidia.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20191113021420.13377-1-henryl@nvidia.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      52869931
  7. 10 11月, 2019 1 次提交
  8. 06 11月, 2019 7 次提交
  9. 30 10月, 2019 1 次提交
  10. 24 10月, 2019 1 次提交
  11. 22 10月, 2019 1 次提交
  12. 17 10月, 2019 1 次提交
  13. 07 10月, 2019 1 次提交
  14. 24 9月, 2019 1 次提交
  15. 17 9月, 2019 1 次提交
  16. 28 8月, 2019 2 次提交
  17. 26 8月, 2019 2 次提交
  18. 25 8月, 2019 1 次提交
    • T
      ALSA: usb-audio: Clean up check_input_term() · e0ccdef9
      Takashi Iwai 提交于
      The primary changes in this patch are cleanups of __check_input_term()
      and move to a non-nested switch-case block by evaluating the pair of
      UAC version and the unit type, as we've done for parse_audio_unit().
      Also each parser is split into the function for readability.
      
      Now, a slight behavior change by this cleanup is the handling of
      processing and extension units.  Formerly we've dealt with them
      differently between UAC1/2 and UAC3; the latter returns an error if no
      input sources are available, while the former continues to parse.
      
      In this patch, unify the behavior in all cases: when input sources are
      available, it parses recursively, then override the type and the id,
      as well as channel information if not provided yet.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e0ccdef9
  19. 22 8月, 2019 5 次提交
    • T
      ALSA: usb-audio: Remove superfluous bLength checks · b8e4f1fd
      Takashi Iwai 提交于
      Now that we got the more comprehensive validation code for USB-audio
      descriptors, the check of overflow in each descriptor unit parser
      became superfluous.  Drop some of the obvious cases.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b8e4f1fd
    • T
      ALSA: usb-audio: Unify the release of usb_mixer_elem_info objects · 52c3e317
      Takashi Iwai 提交于
      Instead of the direct kfree() calls, introduce a new local helper to
      release the usb_mixer_elem_info object.  This will be extended to do
      more than a single kfree() in the later patches.
      
      Also, use the standard goto instead of multiple calls in
      parse_audio_selector_unit() error paths.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      52c3e317
    • T
      ALSA: usb-audio: Simplify parse_audio_unit() · 68e9fde2
      Takashi Iwai 提交于
      Minor code refactoring by combining the UAC version and the type in
      the switch-case flow, so that we reduce the indentation and
      redundancy.  One good bonus is that the duplicated definition of the
      same type value (e.g. UAC2_EFFECT_UNIT) can be handled more cleanly.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      68e9fde2
    • T
      ALSA: usb-audio: More validations of descriptor units · 57f87706
      Takashi Iwai 提交于
      Introduce a new helper to validate each audio descriptor unit before
      and check the unit before actually accessing it.  This should harden
      against the OOB access cases with malformed descriptors that have been
      recently frequently reported by fuzzers.
      
      The existing descriptor checks are still kept although they become
      superfluous after this patch.  They'll be cleaned up eventually
      later.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      57f87706
    • T
      ALSA: usb-audio: Check mixer unit bitmap yet more strictly · f9f0e9ed
      Takashi Iwai 提交于
      The bmControls (for UAC1) or bmMixerControls (for UAC2/3) bitmap has a
      variable size depending on both input and output pins.  Its size is to
      fit with input * output bits.  The problem is that the input size
      can't be determined simply from the unit descriptor itself but it
      needs to parse the whole connected sources.  Although the
      uac_mixer_unit_get_channels() tries to check some possible overflow of
      this bitmap, it's incomplete due to the lack of the  evaluation of
      input pins.
      
      For covering possible overflows, this patch adds the bitmap overflow
      check in the loop of input pins in parse_audio_mixer_unit().
      
      Fixes: 0bfe5e43 ("ALSA: usb-audio: Check mixer unit descriptors more strictly")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f9f0e9ed