1. Dec 07, 2018
  2. Dec 06, 2018
  3. Dec 05, 2018
  4. Dec 03, 2018
  5. Nov 30, 2018
  6. Nov 29, 2018
  7. Nov 28, 2018
  8. Nov 27, 2018
  9. Nov 26, 2018
  10. Nov 25, 2018
    • Takashi Iwai's avatar
      ALSA: control: Consolidate helpers for adding and replacing ctl elements · 3103c08f
      Takashi Iwai authored
      
      
      Both snd_ctl_add() and snd_ctl_replace() process the things in a
      fairly similar way, and indeed the most of the codes can be unified.
      
      This patch is a refactoring to consolidate the both functions to call
      a single helper with an extra "mode" argument.  There should be no
      functional difference, except for one additional sanity check applied
      now to snd_ctl_replace() (which was rather overlooking, IMO), too.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3103c08f
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 5f2ad594
      Takashi Iwai authored
      
      
      Pull the user control race fix, so that we can continue working on the
      code refactoring.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5f2ad594
    • Takashi Iwai's avatar
      ALSA: control: Fix race between adding and removing a user element · e1a7bfe3
      Takashi Iwai authored
      
      
      The procedure for adding a user control element has some window opened
      for race against the concurrent removal of a user element.  This was
      caught by syzkaller, hitting a KASAN use-after-free error.
      
      This patch addresses the bug by wrapping the whole procedure to add a
      user control element with the card->controls_rwsem, instead of only
      around the increment of card->user_ctl_count.
      
      This required a slight code refactoring, too.  The function
      snd_ctl_add() is split to two parts: a core function to add the
      control element and a part calling it.  The former is called from the
      function for adding a user control element inside the controls_rwsem.
      
      One change to be noted is that snd_ctl_notify() for adding a control
      element gets called inside the controls_rwsem as well while it was
      called outside the rwsem.  But this should be OK, as snd_ctl_notify()
      takes another (finer) rwlock instead of rwsem, and the call of
      snd_ctl_notify() inside rwsem is already done in another code path.
      
      Reported-by: default avatar <syzbot+dc09047bce3820621ba2@syzkaller.appspotmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e1a7bfe3
    • Takashi Iwai's avatar
      ALSA: sparc: Fix invalid snd_free_pages() at error path · 9a20332a
      Takashi Iwai authored
      
      
      Some spurious calls of snd_free_pages() have been overlooked and
      remain in the error paths of sparc cs4231 driver code.  Since
      runtime->dma_area is managed by the PCM core helper, we shouldn't
      release manually.
      
      Drop the superfluous calls.
      
      Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9a20332a
    • Takashi Iwai's avatar
      ALSA: wss: Fix invalid snd_free_pages() at error path · 7b691541
      Takashi Iwai authored
      
      
      Some spurious calls of snd_free_pages() have been overlooked and
      remain in the error paths of wss driver code.  Since runtime->dma_area
      is managed by the PCM core helper, we shouldn't release manually.
      
      Drop the superfluous calls.
      
      Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7b691541
  11. Nov 24, 2018
  12. Nov 23, 2018