1. 11 5月, 2012 8 次提交
    • D
      KEYS: Add invalidation support · fd75815f
      David Howells 提交于
      Add support for invalidating a key - which renders it immediately invisible to
      further searches and causes the garbage collector to immediately wake up,
      remove it from keyrings and then destroy it when it's no longer referenced.
      
      It's better not to do this with keyctl_revoke() as that marks the key to start
      returning -EKEYREVOKED to searches when what is actually desired is to have the
      key refetched.
      
      To invalidate a key the caller must be granted SEARCH permission by the key.
      This may be too strict.  It may be better to also permit invalidation if the
      caller has any of READ, WRITE or SETATTR permission.
      
      The primary use for this is to evict keys that are cached in special keyrings,
      such as the DNS resolver or an ID mapper.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      fd75815f
    • D
      KEYS: Do LRU discard in full keyrings · 31d5a79d
      David Howells 提交于
      Do an LRU discard in keyrings that are full rather than returning ENFILE.  To
      perform this, a time_t is added to the key struct and updated by the creation
      of a link to a key and by a key being found as the result of a search.  At the
      completion of a successful search, the keyrings in the path between the root of
      the search and the first found link to it also have their last-used times
      updated.
      
      Note that discarding a link to a key from a keyring does not necessarily
      destroy the key as there may be references held by other places.
      
      An alternate discard method that might suffice is to perform FIFO discard from
      the keyring, using the spare 2-byte hole in the keylist header as the index of
      the next link to be discarded.
      
      This is useful when using a keyring as a cache for DNS results or foreign
      filesystem IDs.
      
      
      This can be tested by the following.  As root do:
      
      	echo 1000 >/proc/sys/kernel/keys/root_maxkeys
      
      	kr=`keyctl newring foo @s`
      	for ((i=0; i<2000; i++)); do keyctl add user a$i a $kr; done
      
      Without this patch ENFILE should be reported when the keyring fills up.  With
      this patch, the keyring discards keys in an LRU fashion.  Note that the stored
      LRU time has a granularity of 1s.
      
      After doing this, /proc/key-users can be observed and should show that most of
      the 2000 keys have been discarded:
      
      	[root@andromeda ~]# cat /proc/key-users
      	    0:   517 516/516 513/1000 5249/20000
      
      The "513/1000" here is the number of quota-accounted keys present for this user
      out of the maximum permitted.
      
      In /proc/keys, the keyring shows the number of keys it has and the number of
      slots it has allocated:
      
      	[root@andromeda ~]# grep foo /proc/keys
      	200c64c4 I--Q--     1 perm 3b3f0000     0     0 keyring   foo: 509/509
      
      The maximum is (PAGE_SIZE - header) / key pointer size.  That's typically 509
      on a 64-bit system and 1020 on a 32-bit system.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      31d5a79d
    • D
      KEYS: Permit in-place link replacement in keyring list · 233e4735
      David Howells 提交于
      Make use of the previous patch that makes the garbage collector perform RCU
      synchronisation before destroying defunct keys.  Key pointers can now be
      replaced in-place without creating a new keyring payload and replacing the
      whole thing as the discarded keys will not be destroyed until all currently
      held RCU read locks are released.
      
      If the keyring payload space needs to be expanded or contracted, then a
      replacement will still need allocating, and the original will still have to be
      freed by RCU.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      233e4735
    • D
      KEYS: Perform RCU synchronisation on keys prior to key destruction · 65d87fe6
      David Howells 提交于
      Make the keys garbage collector invoke synchronize_rcu() prior to destroying
      keys with a zero usage count.  This means that a key can be examined under the
      RCU read lock in the safe knowledge that it won't get deallocated until after
      the lock is released - even if its usage count becomes zero whilst we're
      looking at it.
      
      This is useful in keyring search vs key link.  Consider a keyring containing a
      link to a key.  That link can be replaced in-place in the keyring without
      requiring an RCU copy-and-replace on the keyring contents without breaking a
      search underway on that keyring when the displaced key is released, provided
      the key is actually destroyed only after the RCU read lock held by the search
      algorithm is released.
      
      This permits __key_link() to replace a key without having to reallocate the key
      payload.  A key gets replaced if a new key being linked into a keyring has the
      same type and description.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      65d87fe6
    • D
      KEYS: Announce key type (un)registration · 1eb1bcf5
      David Howells 提交于
      Announce the (un)registration of a key type in the core key code rather than
      in the callers.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NMimi Zohar <zohar@us.ibm.com>
      1eb1bcf5
    • D
      KEYS: Reorganise keys Makefile · 9f7ce8e2
      David Howells 提交于
      Reorganise the keys directory Makefile to put all the core bits together and
      the type-specific bits after.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NMimi Zohar <zohar@us.ibm.com>
      9f7ce8e2
    • D
      KEYS: Move the key config into security/keys/Kconfig · f0894940
      David Howells 提交于
      Move the key config into security/keys/Kconfig as there are going to be a lot
      of key-related options.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NMimi Zohar <zohar@us.ibm.com>
      f0894940
    • D
      KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat · 45de6767
      David Howells 提交于
      Use the 32-bit compat keyctl() syscall wrapper on Sparc64 for Sparc32 binary
      compatibility.
      
      Without this, keyctl(KEYCTL_INSTANTIATE_IOV) is liable to malfunction as it
      uses an iovec array read from userspace - though the kernel should survive this
      as it checks pointers and sizes anyway.
      
      I think all the other keyctl() function should just work, provided (a) the top
      32-bits of each 64-bit argument register are cleared prior to invoking the
      syscall routine, and the 32-bit address space is right at the 0-end of the
      64-bit address space.  Most of the arguments are 32-bit anyway, and so for
      those clearing is not required.
      
      Signed-off-by: David Howells <dhowells@redhat.com
      cc: "David S. Miller" <davem@davemloft.net>
      cc: sparclinux@vger.kernel.org
      cc: stable@vger.kernel.org
      45de6767
  2. 04 5月, 2012 1 次提交
  3. 30 4月, 2012 7 次提交
    • L
      Linux 3.4-rc5 · 69964ea4
      Linus Torvalds 提交于
      69964ea4
    • L
      Merge tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 6cfdd02b
      Linus Torvalds 提交于
      Pull power management fixes from Rafael J. Wysocki:
       "Fix for an issue causing hibernation to hang on systems with highmem
        (that practically means i386) due to broken memory management (bug
        introduced in 3.2, so -stable material) and PM documentation update
        making the freezer documentation follow the code again after some
        recent updates."
      
      * tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / Freezer / Docs: Update documentation about freezing of tasks
        PM / Hibernate: fix the number of pages used for hibernate/thaw buffering
      6cfdd02b
    • L
      autofs: make the autofsv5 packet file descriptor use a packetized pipe · 64f371bc
      Linus Torvalds 提交于
      The autofs packet size has had a very unfortunate size problem on x86:
      because the alignment of 'u64' differs in 32-bit and 64-bit modes, and
      because the packet data was not 8-byte aligned, the size of the autofsv5
      packet structure differed between 32-bit and 64-bit modes despite
      looking otherwise identical (300 vs 304 bytes respectively).
      
      We first fixed that up by making the 64-bit compat mode know about this
      problem in commit a32744d4 ("autofs: work around unhappy compat
      problem on x86-64"), and that made a 32-bit 'systemd' work happily on a
      64-bit kernel because everything then worked the same way as on a 32-bit
      kernel.
      
      But it turned out that 'automount' had actually known and worked around
      this problem in user space, so fixing the kernel to do the proper 32-bit
      compatibility handling actually *broke* 32-bit automount on a 64-bit
      kernel, because it knew that the packet sizes were wrong and expected
      those incorrect sizes.
      
      As a result, we ended up reverting that compatibility mode fix, and
      thus breaking systemd again, in commit fcbf94b9.
      
      With both automount and systemd doing a single read() system call, and
      verifying that they get *exactly* the size they expect but using
      different sizes, it seemed that fixing one of them inevitably seemed to
      break the other.  At one point, a patch I seriously considered applying
      from Michael Tokarev did a "strcmp()" to see if it was automount that
      was doing the operation.  Ugly, ugly.
      
      However, a prettier solution exists now thanks to the packetized pipe
      mode.  By marking the communication pipe as being packetized (by simply
      setting the O_DIRECT flag), we can always just write the bigger packet
      size, and if user-space does a smaller read, it will just get that
      partial end result and the extra alignment padding will simply be thrown
      away.
      
      This makes both automount and systemd happy, since they now get the size
      they asked for, and the kernel side of autofs simply no longer needs to
      care - it could pad out the packet arbitrarily.
      
      Of course, if there is some *other* user of autofs (please, please,
      please tell me it ain't so - and we haven't heard of any) that tries to
      read the packets with multiple writes, that other user will now be
      broken - the whole point of the packetized mode is that one system call
      gets exactly one packet, and you cannot read a packet in pieces.
      Tested-by: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: David Miller <davem@davemloft.net>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Thomas Meyer <thomas@m3y3r.de>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      64f371bc
    • M
      PM / Freezer / Docs: Update documentation about freezing of tasks · 26e0f90f
      Marcos Paulo de Souza 提交于
      The file Documentation/power/freezing-of-tasks.txt was still referencing
      the TIF_FREEZE flag, that was removed by the commit
      d88e4cb6(freezer: remove now unused
      TIF_FREEZE).
      
      This patch removes all the references of TIF_FREEZE that were left
      behind.
      Signed-off-by: NMarcos Paulo de Souza <marcos.souza.org@gmail.com>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      26e0f90f
    • L
      pipes: add a "packetized pipe" mode for writing · 9883035a
      Linus Torvalds 提交于
      The actual internal pipe implementation is already really about
      individual packets (called "pipe buffers"), and this simply exposes that
      as a special packetized mode.
      
      When we are in the packetized mode (marked by O_DIRECT as suggested by
      Alan Cox), a write() on a pipe will not merge the new data with previous
      writes, so each write will get a pipe buffer of its own.  The pipe
      buffer is then marked with the PIPE_BUF_FLAG_PACKET flag, which in turn
      will tell the reader side to break the read at that boundary (and throw
      away any partial packet contents that do not fit in the read buffer).
      
      End result: as long as you do writes less than PIPE_BUF in size (so that
      the pipe doesn't have to split them up), you can now treat the pipe as a
      packet interface, where each read() system call will read one packet at
      a time.  You can just use a sufficiently big read buffer (PIPE_BUF is
      sufficient, since bigger than that doesn't guarantee atomicity anyway),
      and the return value of the read() will naturally give you the size of
      the packet.
      
      NOTE! We do not support zero-sized packets, and zero-sized reads and
      writes to a pipe continue to be no-ops.  Also note that big packets will
      currently be split at write time, but that the size at which that
      happens is not really specified (except that it's bigger than PIPE_BUF).
      Currently that limit is the system page size, but we might want to
      explicitly support bigger packets some day.
      
      The main user for this is going to be the autofs packet interface,
      allowing us to stop having to care so deeply about exact packet sizes
      (which have had bugs with 32/64-bit compatibility modes).  But user
      space can create packetized pipes with "pipe2(fd, O_DIRECT)", which will
      fail with an EINVAL on kernels that do not support this interface.
      Tested-by: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: David Miller <davem@davemloft.net>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Thomas Meyer <thomas@m3y3r.de>
      Cc: stable@kernel.org  # needed for systemd/autofs interaction fix
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9883035a
    • L
      Merge tag 'staging-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · de9e24ed
      Linus Torvalds 提交于
      Pull staging tree fixes from Greg Kroah-Hartman:
       "Here are some tiny drivers/staging/ bugfixes.  Some build fixes that
        were recently reported, as well as one kfree bug that is hitting a
        number of users."
      
      * tag 'staging-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: ozwpan: Fix bug where kfree is called twice.
        staging: octeon-ethernet: fix build errors by including interrupt.h
        staging: zcache: fix Kconfig crypto dependency
        staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESS
      de9e24ed
    • L
      Merge tag 'usb-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 8d7d1adc
      Linus Torvalds 提交于
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a number of small USB fixes for 3.4-rc5.
      
        Nothing major, as before, some USB gadget fixes.  There's a crash fix
        for a number of ASUS laptops on resume that had been reported by a
        number of different people.  We think the fix might also pertain to
        other machines, as this was a BIOS bug, and they seem to travel to
        different models and manufacturers quite easily.  Other than that,
        some other reported problems fixed as well."
      
      * tag 'usb-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: gadget: udc-core: fix incompatibility with dummy-hcd
        usb: gadget: udc-core: fix wrong call order
        USB: cdc-wdm: fix race leading leading to memory corruption
        USB: EHCI: fix crash during suspend on ASUS computers
        usb gadget: uvc: uvc_request_data::length field must be signed
        usb: gadget: dummy: do not call pullup() on udc_stop()
        usb: musb: davinci.c: add missing unregister
        usb: musb: drop __deprecated flag
        USB: gadget: storage gadgets send wrong error code for unknown commands
        usb: otg: gpio_vbus: Add otg transceiver events and notifiers
      8d7d1adc
  4. 29 4月, 2012 3 次提交
    • 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
  5. 28 4月, 2012 21 次提交
    • L
      Revert "autofs: work around unhappy compat problem on x86-64" · fcbf94b9
      Linus Torvalds 提交于
      This reverts commit a32744d4.
      
      While that commit was technically the right thing to do, and made the
      x86-64 compat mode work identically to native 32-bit mode (and thus
      fixing the problem with a 32-bit systemd install on a 64-bit kernel), it
      turns out that the automount binaries had workarounds for this compat
      problem.
      
      Now, the workarounds are disgusting: doing an "uname()" to find out the
      architecture of the kernel, and then comparing it for the 64-bit cases
      and fixing up the size of the read() in automount for those.  And they
      were confused: it's not actually a generic 64-bit issue at all, it's
      very much tied to just x86-64, which has different alignment for an
      'u64' in 64-bit mode than in 32-bit mode.
      
      But the end result is that fixing the compat layer actually breaks the
      case of a 32-bit automount on a x86-64 kernel.
      
      There are various approaches to fix this (including just doing a
      "strcmp()" on current->comm and comparing it to "automount"), but I
      think that I will do the one that teaches pipes about a special "packet
      mode", which will allow user space to not have to care too deeply about
      the padding at the end of the autofs packet.
      
      That change will make the compat workaround unnecessary, so let's revert
      it first, and get automount working again in compat mode.  The
      packetized pipes will then fix autofs for systemd.
      Reported-and-requested-by: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Ian Kent <raven@themaw.net>
      Cc: stable@kernel.org # for 3.3
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fcbf94b9
    • K
      drm/i915: Set the Stencil Cache eviction policy to non-LRA mode. · 3a69ddd6
      Kenneth Graunke 提交于
      Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in
      OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when
      using separate stencil buffers.  Without it, the GPU tries to use the
      LRA eviction policy, which isn't supported.  This was supposed to be off
      by default, but seems to be on for many machines.
      
      This cannot be done in gen6_init_clock_gating with most of the other
      workaround bits; the render ring needs to exist.  Otherwise, the
      register write gets dropped on the floor (one printk will show it
      changed, but a second printk immediately following shows the value
      reverts to the old one).
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47535
      Cc: stable@vger.kernel.org
      Cc: Rob Castle <futuredub@gmail.com>
      Cc: Eric Appleman <erappleman@gmail.com>
      Cc: aaron667@gmx.net
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: NKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3a69ddd6
    • A
      drm/radeon/kms: need to set up ss on DP bridges as well · 700698e7
      Alex Deucher 提交于
      Makes Nutmeg DP to VGA bridges work for me.
      
      Fixes:
      https://bugs.freedesktop.org/show_bug.cgi?id=42490
      
      Noticed by Jerome Glisse (after weeks of debugging).
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      700698e7
    • L
      Merge git://git.samba.org/sfrench/cifs-2.6 · c629eaf8
      Linus Torvalds 提交于
      Pull CIFS fixes from Steve French.
      
      * git://git.samba.org/sfrench/cifs-2.6:
        Use correct conversion specifiers in cifs_show_options
        CIFS: Show backupuid/gid in /proc/mounts
        cifs: fix offset handling in cifs_iovec_write
      c629eaf8
    • L
      Merge tag 'stable/for-linus-3.4-rc4-tag' of... · 4bbbf13f
      Linus Torvalds 提交于
      Merge tag 'stable/for-linus-3.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull Xen fixes from Konrad Rzeszutek Wilk:
       "Some of these had been in existence since the 2.6.27 days, some since
        3.0 - and some due to new features added in v3.4.
      
        The one that is most interesting is David's one - in the low-level
        assembler code we had be checking events needlessly.  With his patch
        now we do it when the appropriate flag is set - with the added benefit
        that we can process events faster.  Stefano's is fixing a mistake
        where the Linux IRQ numbers were ACK-ed instead of the Xen IRQ,
        resulting in missing interrupts.  The other ones are bootup related
        that can show up on various hardware."
      
       - In the low-level assembler code we would jump to check events even if
         none were present.  This incorrect behavior had been there since
         2.6.27 days!
       - When using the fast-path for ACK-ing interrupts we were using the
         Linux IRQ numbers instead of the Xen ones (and they can differ) and
         missing interrupts in process.
       - Fix bootup crashes when ACPI hotplug CPUs were present and they would
         expand past the set number of CPUs we were allocated.
       - Deal with broken BIOSes when uploading C-states to the hypervisor.
       - Disable the cpuid check for MWAIT_LEAF if the ACPI PAD driver is
         loaded.  If the ACPI PAD driver is used it will crash, so lets not
         export the functionality so the ACPI PAD driver won't load.
      
      * tag 'stable/for-linus-3.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: correctly check for pending events when restoring irq flags
        xen/acpi: Workaround broken BIOSes exporting non-existing C-states.
        xen/smp: Fix crash when booting with ACPI hotplug CPUs.
        xen: use the pirq number to check the pirq_eoi_map
        xen/enlighten: Disable MWAIT_LEAF so that acpi-pad won't be loaded.
      4bbbf13f
    • L
      Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6 · 84c6a81b
      Linus Torvalds 提交于
      Pull misc SPI device driver bug fixes from Grant Likely.
      
      * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6:
        spi/spi-bfin5xx: Fix flush of last bit after each spi transfer
        spi/spi-bfin5xx: fix reversed if condition in interrupt mode
        spi/spi_bfin_sport: drop bits_per_word from client data
        spi/bfin_spi: drop bits_per_word from client data
        spi/spi-bfin-sport: move word length setup to transfer handler
        spi/bfin5xx: rename config macro name for bfin5xx spi controller driver
        spi/pl022: Allow request for higher frequency than maximum possible
        spi/bcm63xx: set master driver mode_bits.
        spi/bcm63xx: don't use the stopping state
        spi/bcm63xx: convert to the pump message infrastructure
        spi/spi-ep93xx.c: use dma_transfer_direction instead of dma_data_direction
        spi: fix spi.h kernel-doc warning
        spi/pl022: Fix calculate_effective_freq()
        spi/pl022: Fix range checking for bits per word
      84c6a81b
    • L
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 9f7e2f90
      Linus Torvalds 提交于
      Pull hwmon patches from Guenter Roeck:
       - Fix build warning in ad7314 driver
       - Fix pci_device_id array access in fam15h_power driver, introduced by
         commit 00250ec9 ("hwmon: fam15h_power: fix bogus values with
         current BIOSes")
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (fam15h_power) Fix pci_device_id array
        hwmon: (ad7314) Fix build warning
      9f7e2f90
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · a882a4d0
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "For your Friday pull request stack, nothing astounding or shattering
        this week some exynos, some intel, some radeon fixes.  One intel fix
        for a regression somwehere back in 2.6.35 land."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon/kms: use frac fb div on APUs
        drm/radeon: add a missing entry to encoder_names
        drm/i915: handle input/output sdvo timings separately in mode_set
        drm/i915: fix integer overflow in i915_gem_do_execbuffer()
        drm/i915: fix integer overflow in i915_gem_execbuffer2()
        drm/exynos: added missed vm area region mapping type.
        drm/exynos: fixed exynos_drm_gem_map_pages bug.
        drm/exynos: fixed duplicatd memory allocation bug.
        drm/i915: fixup load-detect on enabled, but not active pipe
      a882a4d0
    • L
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 78e97a47
      Linus Torvalds 提交于
      Pull RCU fix from Ingo Molnar.
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rcu: Permit call_rcu() from CPU_DYING notifiers
      78e97a47
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c28c4851
      Linus Torvalds 提交于
      Pull x86 fixes from Ingo Molnar.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic: Use x2apic physical mode based on FADT setting
        x86/mrst: Quiet sparse noise about plain integer as NULL pointer
        x86, intel_cacheinfo: Fix error return code in amd_set_l3_disable_slot()
      c28c4851
    • L
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · daae677f
      Linus Torvalds 提交于
      Pull scheduler fixes from Ingo Molnar.
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Fix OOPS when build_sched_domains() percpu allocation fails
        sched: Fix more load-balancing fallout
      daae677f
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 06fc5d3d
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix perf_event_for_each() to use sibling
        perf symbols: Read plt symbols from proper symtab_type binary
        tracing: Fix stacktrace of latency tracers (irqsoff and friends)
        perf tools: Add 'G' and 'H' modifiers to event parsing
        tracing: Fix regression with tracing_on
        perf tools: Drop CROSS_COMPILE from flex and bison calls
        perf report: Fix crash showing warning related to kernel maps
        tracing: Fix build breakage without CONFIG_PERF_EVENTS (again)
      06fc5d3d
    • L
      Merge branch 'for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux · f6072452
      Linus Torvalds 提交于
      Pull build fixes for less mainstream architectures from Paul Gortmaker:
       "These are fixes for frv(1), blackfin(2), powerpc(1) and xtensa(4).
      
        Fortunately the touches are nearly all specific to files just used by
        the arch in question.  The two touches to shared/common files
        [kernel/irq/debug.h and drivers/pci/Makefile] are trivial to assess as
        no risk to anyone.
      
        Half of them relate to xtensa directly.  It was only when I fixed the
        last xtensa issue that I realized that the arch has been broken for a
        significant time, and isn't a specific v3.4 regression.  So if you
        wanted, we could leave xtensa lying bleeding in the street for a
        couple more weeks and queue those for 3.5.  But given they are no risk
        to anyone outside of xtensa, I figured to just leave them in.
      
        If you are OK with taking the xtensa fixes, then please pull to get:
      
         - one last implicit include uncovered by system.h that is in a file
           specific to just one powerpc defconfig.  (I'd sync'd with BenH).
      
         - fix an oversight in the PCI makefile where shared code wasn't being
           compiled for ARCH=frv
      
         - fix a missing include for GPIO in blackfin framebuffer.
      
         - audit and tag endif in blackfin ezkit board file, in order to find
           and fix the misplaced endif masking a block of code.
      
         - fix irq/debug.h choice of temporary macro names to be more internal
           so they don't conflict with names used by xtensa.
      
         - fix a reference to an undeclared local var in xtensa's signal.c
      
         - fix an implicit bug.h usage in xtensa's asm/io.h uncovered by my
           removing bug.h from kernel.h
      
         - fix xtensa to properly indicate it is using asm-generic/hardirq.h
           in order to resolve the link error - undefined ack_bad_irq
      
        The xtensa still fails final link as my latest binutils does something
        evil when ld forward-relocates unlikely() blocks, but in theory people
        who have older/valid toolchains could now use the thing."
      
      * 'for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
        xtensa: fix build fail on undefined ack_bad_irq
        blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c
        blackfin: fix compile error in bfin-lq035q1-fb.c
        pci: frv architecture needs generic setup-bus infrastructure
        irq: hide debug macros so they don't collide with others.
        xtensa: fix build error in xtensa/include/asm/io.h
        xtensa: fix build failure in xtensa/kernel/signal.c
        powerpc: fix system.h fallout in sysdev/scom.c [chroma_defconfig]
      f6072452
    • L
      Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh · d7e69bc7
      Linus Torvalds 提交于
      Pull SuperH fixes from Paul Mundt.
      
      * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
        sh: Fix up tracepoint build fallout from static key introduction.
        sh: Fix error synchronising kernel page tables
      d7e69bc7
    • L
      Merge branch 'docs-3.4' of git://git.samba.org/jlayton/linux · 9c687702
      Linus Torvalds 提交于
      Pull security key doc update from Jeff Layton:
       "Ordinarily, I send my patches through others' trees, but David
        suggested I just send this one to you directly since it's just a
        Documentation/ update"
      
      * 'docs-3.4' of git://git.samba.org/jlayton/linux:
        keys: update the documentation with info about "logon" keys
      9c687702
    • D
      xen: correctly check for pending events when restoring irq flags · 7eb7ce4d
      David Vrabel 提交于
      In xen_restore_fl_direct(), xen_force_evtchn_callback() was being
      called even if no events were pending.  This resulted in (depending on
      workload) about a 100 times as many xen_version hypercalls as
      necessary.
      
      Fix this by correcting the sense of the conditional jump.
      
      This seems to give a significant performance benefit for some
      workloads.
      
      There is some subtle tricksy "..since the check here is trying to
      check both pending and masked in a single cmpw, but I think this is
      correct. It will call check_events now only when the combined
      mask+pending word is 0x0001 (aka unmasked, pending)." (Ian)
      
      CC: stable@kernel.org
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      7eb7ce4d
    • C
      Btrfs: reduce lock contention during extent insertion · dc7fdde3
      Chris Mason 提交于
      We're spending huge amounts of time on lock contention during
      end_io processing because we unconditionally assume we are overwriting
      an existing extent in the file for each IO.
      
      This checks to see if we are outside i_size, and if so, it uses a
      less expensive readonly search of the btree to look for existing
      extents.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      dc7fdde3
    • C
      Btrfs: avoid deadlocks from GFP_KERNEL allocations during btrfs_real_readdir · fede766f
      Chris Mason 提交于
      Btrfs has an optimization where it will preallocate dentries during
      readdir to fill in enough information to open the inode without an extra
      lookup.
      
      But, we're calling d_alloc, which is doing GFP_KERNEL allocations, and
      that leads to deadlocks because our readdir code has tree locks held.
      
      For now, disable this optimization.  We'll fix the gfp mask in the next
      merge window.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      fede766f
    • S
      spi/spi-bfin5xx: Fix flush of last bit after each spi transfer · 2431a815
      Scott Jiang 提交于
      This patch ensures that the last bit of a transfer gets correctly
      flushed out of the register.
      Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      2431a815
    • S
      spi/spi-bfin5xx: fix reversed if condition in interrupt mode · 128465ca
      Scott Jiang 提交于
      This condition is used to determine 8 bits or 16 and 32 bits transfer.
      Obviously it is reversed.
      Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      128465ca
    • S
      spi/spi_bfin_sport: drop bits_per_word from client data · 8d9d2a4b
      Scott Jiang 提交于
      Since the member was dropped from the common Blackfin header, we need
      to stop using it in the SPORT driver too.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      8d9d2a4b