Skip to content
  1. Dec 24, 2011
  2. Dec 23, 2011
  3. Dec 21, 2011
  4. Dec 20, 2011
  5. Dec 16, 2011
  6. Dec 15, 2011
  7. Dec 14, 2011
  8. Dec 13, 2011
    • Miklos Szeredi's avatar
      fuse: llseek fix race · 73104b6e
      Miklos Szeredi authored
      Fix race between lseek(fd, 0, SEEK_CUR) and read/write.  This was fixed in
      generic code by commit 5b6f1eb9
      
       (vfs: lseek(fd, 0, SEEK_CUR) race condition).
      
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      73104b6e
    • Roel Kluin's avatar
      fuse: fix llseek bug · b48c6af2
      Roel Kluin authored
      The test in fuse_file_llseek() "not SEEK_CUR or not SEEK_SET" always evaluates
      to true.
      
      This was introduced in 3.1 by commit 06222e49
      
       (fs: handle SEEK_HOLE/SEEK_DATA
      properly in all fs's that define their own llseek) and changed the behavior of
      SEEK_CUR and SEEK_SET to always retrieve the file attributes.  This is a
      performance regression.
      
      Fix the test so that it makes sense.
      
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      CC: stable@vger.kernel.org
      CC: Josef Bacik <josef@redhat.com>
      CC: Al Viro <viro@zeniv.linux.org.uk>
      b48c6af2
    • Miklos Szeredi's avatar
      fuse: fix fuse_retrieve · 48706d0a
      Miklos Szeredi authored
      
      
      Fix two bugs in fuse_retrieve():
      
       - retrieving more than one page would yield repeated instances of the
         first page
      
       - if more than FUSE_MAX_PAGES_PER_REQ pages were requested than the
         request page array would overflow
      
      fuse_retrieve() was added in 2.6.36 and these bugs had been there since the
      beginning.
      
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      CC: stable@vger.kernel.org
      48706d0a
    • Linus Torvalds's avatar
      linux/log2.h: Fix rounddown_pow_of_two(1) · 13c07b02
      Linus Torvalds authored
      Exactly like roundup_pow_of_two(1), the rounddown version was buggy for
      the case of a compile-time constant '1' argument.  Probably because it
      originated from the same code, sharing history with the roundup version
      from before the bugfix (for that one, see commit 1a06a52e
      
      : "Fix
      roundup_pow_of_two(1)").
      
      However, unlike the roundup version, the fix for rounddown is to just
      remove the broken special case entirely.  It's simply not needed - the
      generic code
      
          1UL << ilog2(n)
      
      does the right thing for the constant '1' argment too.  The only reason
      roundup needed that special case was because rounding up does so by
      subtracting one from the argument (and then adding one to the result)
      causing the obvious problems with "ilog2(0)".
      
      But rounddown doesn't do any of that, since ilog2() naturally truncates
      (ie "rounds down") to the right rounded down value.  And without the
      ilog2(0) case, there's no reason for the special case that had the wrong
      value.
      
      tl;dr: rounddown_pow_of_two(1) should be 1, not 0.
      
      Acked-by: default avatarDmitry Torokhov <dtor@vmware.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      13c07b02
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of... · 12870da5
      Linus Torvalds authored
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (jz4740) Staticise jz4740_hwmon_driver
        hwmon: (jz4740) fix signedness bug
      12870da5