1. 29 4月, 2012 5 次提交
    • L
      VFS: clean up and simplify getname_flags() · 3f9f0aa6
      Linus Torvalds 提交于
      This removes a number of silly games around strncpy_from_user() in
      do_getname(), and removes that helper function entirely.  We instead
      make getname_flags() just use strncpy_from_user() properly directly.
      
      Removing the wrapper function simplifies things noticeably, mostly
      because we no longer play the unnecessary games with segments (x86
      strncpy_from_user() no longer needs the hack), but also because the
      empty path handling is just much more obvious.  The return value of
      "strncpy_to_user()" is much more obvious than checking an odd error
      return case from do_getname().
      
      [ non-x86 architectures were notified of this change several weeks ago,
        since it is possible that they have copied the old broken x86
        strncpy_from_user. But nobody reacted, so .. See
      
          http://www.spinics.net/lists/linux-arch/msg17313.html
      
        for details ]
      
      Cc: linux-arch@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3f9f0aa6
    • L
      x86: make word-at-a-time strncpy_from_user clear bytes at the end · 07497083
      Linus Torvalds 提交于
      This makes the newly optimized x86 strncpy_from_user clear the final
      bytes in the word past the final NUL character, rather than copy them as
      the word they were in the source.
      
      NOTE! Unlike the silly semantics of the libc 'strncpy()' function, the
      kernel strncpy_from_user() has never cleared all of the end of the
      destination buffer.  And neither does it do so now: it only clears the
      bytes at the end of the last word it copied.
      
      So why make this change at all? It doesn't really cost us anything extra
      (we have to calculate the mask to get the length anyway), and it means
      that *if* any user actually cares about zeroing the whole buffer, they
      can do a "memset()" before the strncpy_from_user(), and we will no
      longer write random bytes after the NUL character.
      
      In particular, the buffer contents will now at no point contain random
      source data from beyond the end of the string.
      
      In other words, it makes behavior a bit more repeatable at no new cost,
      so it's a small cleanup.  I've been carrying this as a patch for the
      last few weeks or so in my tree (done at the same time the sign error
      was fixed in commit 12e993b8), I might as well commit it.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      07497083
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · f7b00693
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason:
       "This has our collection of bug fixes.  I missed the last rc because I
        thought our patches were making NFS crash during my xfs test runs.
        Turns out it was an NFS client bug fixed by someone else while I tried
        to bisect it.
      
        All of these fixes are small, but some are fairly high impact.  The
        biggest are fixes for our mount -o remount handling, a deadlock due to
        GFP_KERNEL allocations in readdir, and a RAID10 error handling bug.
      
        This was tested against both 3.3 and Linus' master as of this morning."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (26 commits)
        Btrfs: reduce lock contention during extent insertion
        Btrfs: avoid deadlocks from GFP_KERNEL allocations during btrfs_real_readdir
        Btrfs: Fix space checking during fs resize
        Btrfs: fix block_rsv and space_info lock ordering
        Btrfs: Prevent root_list corruption
        Btrfs: fix repair code for RAID10
        Btrfs: do not start delalloc inodes during sync
        Btrfs: fix that check_int_data mount option was ignored
        Btrfs: don't count CRC or header errors twice while scrubbing
        Btrfs: fix btrfs_ioctl_dev_info() crash on missing device
        btrfs: don't return EINTR
        Btrfs: double unlock bug in error handling
        Btrfs: always store the mirror we read the eb from
        fs/btrfs/volumes.c: add missing free_fs_devices
        btrfs: fix early abort in 'remount'
        Btrfs: fix max chunk size check in chunk allocator
        Btrfs: add missing read locks in backref.c
        Btrfs: don't call free_extent_buffer twice in iterate_irefs
        Btrfs: Make free_ipath() deal gracefully with NULL pointers
        Btrfs: avoid possible use-after-free in clear_extent_bit()
        ...
      f7b00693
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · b990f9b3
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "Nothing controversial, just another batch of fixes:
      
         - Samsung/exynos fixes for more merge window fallout: build errors
           and warnings mostly, but also some clock/device setup issues on
           exynos4/5
         - PXA bug and warning fixes related to gpio and pinmux
         - IRQ domain conversion bugfixes for U300 and MSM
         - A regulator setup fix for U300"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: PXA2xx: MFP: fix potential direction bug
        ARM: PXA2xx: MFP: fix bug with MFP_LPM_KEEP_OUTPUT
        arm/sa1100: fix sa1100-rtc memory resource
        ARM: pxa: fix gpio wakeup setting
        ARM: SAMSUNG: add missing MMC_CAP2_BROKEN_VOLTAGE capability
        ARM: EXYNOS: Fix compilation error when CONFIG_OF is not defined
        ARM: EXYNOS: Fix resource on dev-dwmci.c
        ARM: S3C24XX: Fix build warning for S3C2410_PM
        ARM: mini2440_defconfig: Fix build error
        ARM: msm: Fix gic irqdomain support
        ARM: EXYNOS: Fix incorrect initialization of GIC
        ARM: EXYNOS: use 'exynos4-sdhci' as device name for sdhci controllers
        ARM: u300: bump all IRQ numbers by one
        ARM: ux300: Fix unimplementable regulation constraints
      b990f9b3
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · cd88e3a6
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "As soon as I sent the non-urgent stack, two important fixes come in:
      
         - i915: fixes SNB GPU hangs in a number of 3D apps
      
         - radeon: initial fix for VGA on LLano system, 3 or 4 of us have
           spent time debugging this, and Jerome finally figured out the magic
           bit the BIOS/fglrx set that we didn't.  This at least should get
           things working, there may be future reliability fixes."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: Set the Stencil Cache eviction policy to non-LRA mode.
        drm/radeon/kms: need to set up ss on DP bridges as well
      cd88e3a6
  2. 28 4月, 2012 35 次提交