1. 17 Mar, 2012 1 commit
    • Anton Blanchard's avatar
      afs: Read of file returns EBADMSG · 2c724fb9
      Anton Blanchard authored
      A read of a large file on an afs mount failed:
      
      # cat junk.file > /dev/null
      cat: junk.file: Bad message
      
      Looking at the trace, call->offset wrapped since it is only an
      unsigned short. In afs_extract_data:
      
              _enter("{%u},{%zu},%d,,%zu", call->offset, len, last, count);
      ...
      
              if (call->offset < count) {
                      if (last) {
                              _leave(" = -EBADMSG [%d < %zu]", call->offset, count);
                              return -EBADMSG;
                      }
      
      Which matches the trace:
      
      [cat   ] ==> afs_extract_data({65132},{524},1,,65536)
      [cat   ] <== afs_extract_data() = -EBADMSG [0 < 65536]
      
      call->offset went from 65132 to 0. Fix this by making call->offset an
      unsigned int.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2c724fb9
  2. 16 Mar, 2012 15 commits
  3. 15 Mar, 2012 10 commits
  4. 14 Mar, 2012 13 commits
  5. 13 Mar, 2012 1 commit
    • Matt Fleming's avatar
      tile: Use set_current_blocked() and block_sigmask() · ad092338
      Matt Fleming authored
      As described in e6fa16ab ("signal: sigprocmask() should do
      retarget_shared_pending()") the modification of current->blocked is
      incorrect as we need to check whether the signal we're about to block
      is pending in the shared queue.
      
      Also, use the new helper function introduced in commit 5e6292c0
      ("signal: add block_sigmask() for adding sigmask to current->blocked")
      which centralises the code for updating current->blocked after
      successfully delivering a signal and reduces the amount of duplicate
      code across architectures. In the past some architectures got this
      code wrong, so using this helper function should stop that from
      happening again.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      ad092338