1. 23 9月, 2011 3 次提交
    • D
      ALSA: hdspm - cleanup __user tags in ioctl() · 2ca595ab
      Dan Carpenter 提交于
      This makes the code cleaner and silences a Sparse complaint:
      sound/pci/rme9652/hdspm.c:6341:23: warning: incorrect type in assignment (incompatible argument 4 (different address spaces))
      sound/pci/rme9652/hdspm.c:6341:23:    expected int ( *ioctl )( ... )
      sound/pci/rme9652/hdspm.c:6341:23:    got int ( static [toplevel] *<noident> )( ... )
      sound/pci/rme9652/hdspm.c:6102:44: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6225:50: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6264:50: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6283:50: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6289:59: warning: dereference of noderef expression
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ca595ab
    • D
      ALSA: hdspm - potential info leak in snd_hdspm_hwdep_ioctl() · 643d6bbb
      Dan Carpenter 提交于
      Smatch has a new check for Rosenberg type information leaks where
      structs are copied to the user with uninitialized stack data in them.
      
      The status struct has a hole in it, and on some paths not all the
      members were initialized.
      
      struct hdspm_status {
              unsigned char              card_type;            /*     0     1 */
              /* XXX 3 bytes hole, try to pack */
              enum hdspm_syncsource      autosync_source;      /*     4     4 */
              long long unsigned int     card_clock;           /*     8     8 */
      
      The hdspm_version struct had holes in it as well.
      
      struct hdspm_version {
              unsigned char              card_type;            /*     0     1 */
              char                       cardname[20];         /*     1    20 */
              /* XXX 3 bytes hole, try to pack */
              unsigned int               serial;               /*    24     4 */
              short unsigned int         firmware_rev;         /*    28     2 */
              /* XXX 2 bytes hole, try to pack */
              int                        addons;               /*    32     4 */
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      643d6bbb
    • T
      ALSA: fm801 - Clean up redundant reference to snd_fm801_tea575x_gpios[] · 8e699d2c
      Takashi Iwai 提交于
      Use macro to improve readability.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8e699d2c
  2. 22 9月, 2011 3 次提交
  3. 20 9月, 2011 6 次提交
  4. 19 9月, 2011 1 次提交
  5. 16 9月, 2011 2 次提交
  6. 15 9月, 2011 2 次提交
    • A
      ALSA: pcm - fix race condition in wait_for_avail() · 763437a9
      Arjan van de Ven 提交于
      wait_for_avail() in pcm_lib.c has a race in it (observed in practice by an
      Intel validation group).
      
      The function is supposed to return once space in the buffer has become
      available, or if some timeout happens.  The entity that creates space (irq
      handler of sound driver and some such) will do a wake up on a waitqueue
      that this function registers for.
      
      However there are two races in the existing code
      
      1) If space became available between the caller noticing there was no
         space and this function actually sleeping, the wakeup is missed and the
         timeout condition will happen instead
      
      2) If a wakeup happened but not sufficient space became available, the
         code will loop again and wait for more space.  However, if the second
         wake comes in prior to hitting the schedule_timeout_interruptible(), it
         will be missed, and potentially you'll wait out until the timeout
         happens.
      
      The fix consists of using more careful setting of the current state (so
      that if a wakeup happens in the main loop window, the schedule_timeout()
      falls through) and by checking for available space prior to going into the
      schedule_timeout() loop, but after being on the waitqueue and having the
      state set to interruptible.
      
      [tiwai: the following changes have been added to Arjan's original patch:
       - merged akpm's fix for waitqueue adding order into a single patch
       - reduction of duplicated code of avail check
      ]
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      763437a9
    • T
      Merge branch 'fix/asoc' into for-linus · 4038a12e
      Takashi Iwai 提交于
      4038a12e
  7. 14 9月, 2011 6 次提交
  8. 13 9月, 2011 1 次提交
  9. 12 9月, 2011 5 次提交
  10. 06 9月, 2011 2 次提交
  11. 31 8月, 2011 4 次提交
  12. 29 8月, 2011 1 次提交
  13. 26 8月, 2011 2 次提交
  14. 25 8月, 2011 2 次提交