1. 10 Aug, 2017 9 commits
  2. 06 Aug, 2017 10 commits
  3. 04 Aug, 2017 6 commits
    • Takashi Sakamoto's avatar
      ALSA: control: code refactoring for TLV request handler to user element set · 6d4d41f0
      Takashi Sakamoto authored
      User-defined element set registers own handler to get callbacks from TLV
      ioctl handler. In the handler, execution path bifurcates depending on
      requests from user space. At write request, container in given buffer is
      registered to the element set, or replaced old TLV data. At the read
      request, the registered data is copied to user space. The command request
      is not allowed.  In current implementation, function of the handler
      includes codes for the two cases.
      
      This commit adds two helper functions for these cases so that readers can
      easily get the above design.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6d4d41f0
    • Takashi Sakamoto's avatar
      ALSA: control: code refactoring TLV ioctl handler · 450296f3
      Takashi Sakamoto authored
      In a design of ALSA control core, execution path bifurcates depending on
      target element. When a set with the target element has a handler, it's
      called. Else, registered buffer is copied to user space. These two
      operations are apparently different.  In current implementation, they're
      on the same function with a condition statement. This makes it a bit hard
      to understand conditions of each case.
      
      This commit splits codes for these two cases.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      450296f3
    • Takashi Sakamoto's avatar
      ALSA: control: obsolete user_ctl_lock · 30d8340b
      Takashi Sakamoto authored
      At a previous commit, concurrent requests for TLV data are maintained
      exclusively between read requests and write/command requests. TLV
      callback handlers in each driver has no risk from concurrent access for
      reference/change.
      
      In current implementation, 'struct snd_card' has a mutex to control
      concurrent accesses to user-defined element sets. This commit obsoletes it.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      30d8340b
    • Takashi Sakamoto's avatar
      ALSA: control: use counting semaphore as write lock for TLV write/command operations · 4c8099e9
      Takashi Sakamoto authored
      In ALSA control interface, applications can execute three types of request
      for Type-Length-Value (TLV) data to a set of elements; read, write and
      command. In ALSA control core, all of the requests are handled within read
      lock to a counting semaphore, therefore several processes can run to access
      to the data at the same time for any purposes. This has an issue because
      write and command requests have side effect to change state of a set of
      elements for the TLV data. Concurrent access should be controlled for each
      of reference/change case.
      
      This commit uses the counting semaphore as read lock for TLV read requests,
      while use it as write lock for TLV write/command requests. The state of a
      set of elements for the TLV data is maintained exclusively between read
      requests and write/command requests, or between write and command requests.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4c8099e9
    • Takashi Sakamoto's avatar
      ALSA: control: queue events within locking of controls_rwsem for TLV operation · 28a0989c
      Takashi Sakamoto authored
      Any control event is queued by a call of snd_ctl_notify(). This function
      adds the event to each queue of opened file data corresponding to ALSA
      control character devices. This function acquired two types of lock; a
      counting semaphore for a list of the opened file data and a spinlock for
      card data opened by the file. Typically, this function is called after
      acquiring a counting semaphore for a list of elements in the card data.
      
      In current implementation of TLV request handler, the function is called
      after releasing the semaphore for a list of elements in the card data.
      This release is not necessarily needed.
      
      This commit removes the release to call the function within the critical
      section so that later commits are simple.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      28a0989c
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 74be62c7
      Takashi Iwai authored
      Back-merge 4.13-rc devel branch for later development.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      74be62c7
  4. 02 Aug, 2017 2 commits
  5. 01 Aug, 2017 5 commits
  6. 30 Jul, 2017 5 commits
  7. 29 Jul, 2017 1 commit
  8. 28 Jul, 2017 2 commits
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs · 286ba844
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
       "More NFS client bugfixes for 4.13.
      
        Most of these fix locking bugs that Ben and Neil noticed, but I also
        have a patch to fix one more access bug that was reported after last
        week.
      
        Stable fixes:
         - Fix a race where CB_NOTIFY_LOCK fails to wake a waiter
         - Invalidate file size when taking a lock to prevent corruption
      
        Other fixes:
         - Don't excessively generate tiny writes with fallocate
         - Use the raw NFS access mask in nfs4_opendata_access()"
      
      * tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter
        NFS: Optimize fallocate by refreshing mapping when needed.
        NFS: invalidate file size when taking a lock.
        NFS: Use raw NFS access mask in nfs4_opendata_access()
      286ba844
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 19993e73
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - fix firstfsb variables that we left uninitialized, which could lead
         to locking problems.
      
       - check for NULL metadata buffer pointers before using them.
      
       - don't allow btree cursor manipulation if the btree block is corrupt.
         Better to just shut down.
      
       - fix infinite loop problems in quotacheck.
      
       - fix buffer overrun when validating directory blocks.
      
       - fix deadlock problem in bunmapi.
      
      * tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix multi-AG deadlock in xfs_bunmapi
        xfs: check that dir block entries don't off the end of the buffer
        xfs: fix quotacheck dquot id overflow infinite loop
        xfs: check _alloc_read_agf buffer pointer before using
        xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write
        xfs: check _btree_check_block value
      19993e73