Skip to content
  1. Nov 10, 2012
  2. Nov 07, 2012
  3. Oct 29, 2012
    • David S. Miller's avatar
      qlogicpti: Fix build warning. · f7e8d9f8
      David S. Miller authored
      
      
      The build warns:
      
      drivers/scsi/qlogicpti.c: In function 'qpti_sbus_probe':
      drivers/scsi/qlogicpti.c:1316:45: warning: passing argument 1 of 'scsi_host_alloc' discards 'const' qualifier from pointer target type [enabled by default]
      include/scsi/scsi_host.h:778:26: note: expected 'struct scsi_host_template *' but argument is of type 'const struct scsi_host_template *'
      
      The problem is that of_device_id->data is a const void pointer.
      
      This is pretty silly in this specific instance, because for all
      matched device IDs we set match->data to the same value,
      &qpti_template.
      
      So just use that directly instead of the unnecessary and improperly
      typed abstraction.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7e8d9f8
    • David S. Miller's avatar
      sparc: Wire up sys_kcmp. · 1df35f80
      David S. Miller authored
      
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1df35f80
    • David S. Miller's avatar
      sparc64: Improvde documentation and readability of atomic backoff code. · 187818cd
      David S. Miller authored
      
      
      Document what's going on in asm/backoff.h with a large and descriptive
      comment.  Refer to it above the cpu_relax() definition in
      asm/processor_64.h
      
      Rename the pause patching section to have "3insn" in it's name like
      the other patching sections do.
      
      Based upon feedback from Sam Ravnborg.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      187818cd
  4. Oct 28, 2012
    • David S. Miller's avatar
      sparc64: Use pause instruction when available. · e9b9eb59
      David S. Miller authored
      
      
      In atomic backoff and cpu_relax(), use the pause instruction
      found on SPARC-T4 and later.
      
      It makes the cpu strand unselectable for the given number of
      cycles, unless an intervening disrupting trap occurs.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9b9eb59
    • David S. Miller's avatar
      sparc64: Fix cpu strand yielding. · 270c10e0
      David S. Miller authored
      
      
      For atomic backoff, we just loop over an exponentially backed off
      counter.  This is extremely ineffective as it doesn't actually yield
      the cpu strand so that other competing strands can use the cpu core.
      
      In cpus previous to SPARC-T4 we have to do this in a slightly hackish
      way, by doing an operation with no side effects that also happens to
      mark the strand as unavailable.
      
      The mechanism we choose for this is three reads of the %ccr
      (condition-code) register into %g0 (the zero register).
      
      SPARC-T4 has an explicit "pause" instruction, and we'll make use of
      that in a subsequent commit.
      
      Yield strands also in cpu_relax().  We really should have done this a
      very long time ago.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      270c10e0
  5. Oct 27, 2012
    • David S. Miller's avatar
      sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads. · 517ffce4
      David S. Miller authored
      
      
      The Montgomery Multiply, Montgomery Square, and Multiple-Precision
      Multiply instructions work by loading a combination of the floating
      point and multiple register windows worth of integer registers
      with the inputs.
      
      These values are 64-bit.  But for 32-bit userland processes we only
      save the low 32-bits of each integer register during a register spill.
      This is because the register window save area is in the user stack and
      has a fixed layout.
      
      Therefore, the only way to use these instruction in 32-bit mode is to
      perform the following sequence:
      
      1) Load the top-32bits of a choosen integer register with a sentinel,
         say "-1".  This will be in the outer-most register window.
      
         The idea is that we're trying to see if the outer-most register
         window gets spilled, and thus the 64-bit values were truncated.
      
      2) Load all the inputs for the montmul/montsqr/mpmul instruction,
         down to the inner-most register window.
      
      3) Execute the opcode.
      
      4) Traverse back up to the outer-most register window.
      
      5) Check the sentinel, if it's still "-1" store the results.
         Otherwise retry the entire sequence.
      
      This retry is extremely troublesome.  If you're just unlucky and an
      interrupt or other trap happens, it'll push that outer-most window to
      the stack and clear the sentinel when we restore it.
      
      We could retry forever and never make forward progress if interrupts
      arrive at a fast enough rate (consider perf events as one example).
      So we have do limited retries and fallback to software which is
      extremely non-deterministic.
      
      Luckily it's very straightforward to provide a mechanism to let
      32-bit applications use a 64-bit stack.  Stacks in 64-bit mode are
      biased by 2047 bytes, which means that the lowest bit is set in the
      actual %sp register value.
      
      So if we see bit zero set in a 32-bit application's stack we treat
      it like a 64-bit stack.
      
      Runtime detection of such a facility is tricky, and cumbersome at
      best.  For example, just trying to use a biased stack and seeing if it
      works is hard to recover from (the signal handler will need to use an
      alt stack, plus something along the lines of longjmp).  Therefore, we
      add a system call to report a bitmask of arch specific features like
      this in a cheap and less hairy way.
      
      With help from Andy Polyakov.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      517ffce4
    • Linus Torvalds's avatar
      Merge tag 'usb-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1d47091a
      Linus Torvalds authored
      
      
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a bunch of USB fixes for the 3.7-rc tree.
      
        There's a lot of small USB serial driver fixes, and one larger one
        (the mos7840 driver changes are mostly just moving code around to fix
        problems.) Thanks to Johan Hovold for finding the problems and fixing
        them all up.
      
        Other than those, there is the usual new device ids, xhci bugfixes,
        and gadget driver fixes, nothing out of the ordinary.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">
      
      * tag 'usb-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (49 commits)
        xhci: trivial: Remove assigned but unused ep_ctx.
        xhci: trivial: Remove assigned but unused slot_ctx.
        xhci: Fix missing break in xhci_evaluate_context_result.
        xhci: Fix potential NULL ptr deref in command cancellation.
        ehci: Add yet-another Lucid nohandoff pci quirk
        ehci: fix Lucid nohandoff pci quirk to be more generic with BIOS versions
        USB: mos7840: fix port_probe flow
        USB: mos7840: fix port-data memory leak
        USB: mos7840: remove invalid disconnect handling
        USB: mos7840: remove NULL-urb submission
        USB: qcserial: fix interface-data memory leak in error path
        USB: option: fix interface-data memory leak in error path
        USB: ipw: fix interface-data memory leak in error path
        USB: mos7840: fix port-device leak in error path
        USB: mos7840: fix urb leak at release
        USB: sierra: fix port-data memory leak
        USB: sierra: fix memory leak in probe error path
        USB: sierra: fix memory leak in attach error path
        USB: usb-wwan: fix multiple memory leaks in error paths
        USB: keyspan: fix NULL-pointer dereferences and memory leaks
        ...
      1d47091a
    • Linus Torvalds's avatar
      Merge tag 'tty-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 6ad2c73d
      Linus Torvalds authored
      
      
      Pull serial fix from Greg Kroah-Hartman:
       "Here is one patch, a revert of a omap serial driver patch that was
        causing problems, for your 3.7-rc tree.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">
      
      * tag 'tty-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        Revert "serial: omap: fix software flow control"
      6ad2c73d
    • Linus Torvalds's avatar
      Merge tag 'staging-3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 490916d6
      Linus Torvalds authored
      
      
      Pull staging driver fixes from Greg Kroah-Hartman:
       "Here are some staging driver fixes for your 3.7-rc tree.
      
        Nothing major here, a number of iio driver fixups that were causing
        problems, some comedi driver bugfixes, and a bunch of tidspbridge
        warning squashing and other regressions fixed from the 3.6 release.
      
        All have been in the linux-next releases for a bit.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">
      
      * tag 'staging-3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (32 commits)
        staging: tidspbridge: delete unused mmu functions
        staging: tidspbridge: ioremap physical address of the stack segment in shm
        staging: tidspbridge: ioremap dsp sync addr
        staging: tidspbridge: change type to __iomem for per and core addresses
        staging: tidspbridge: drop const from custom mmu implementation
        staging: tidspbridge: request the right irq for mmu
        staging: ipack: add missing include (implicit declaration of function 'kfree')
        staging: ramster: depends on NET
        staging: omapdrm: fix allocation size for page addresses array
        staging: zram: Fix handling of incompressible pages
        Staging: android: binder: Allow using highmem for binder buffers
        Staging: android: binder: Fix memory leak on thread/process exit
        staging: comedi: ni_labpc: fix possible NULL deref during detach
        staging: comedi: das08: fix possible NULL deref during detach
        staging: comedi: amplc_pc263: fix possible NULL deref during detach
        staging: comedi: amplc_pc236: fix possible NULL deref during detach
        staging: comedi: amplc_pc236: fix invalid register access during detach
        staging: comedi: amplc_dio200: fix possible NULL deref during detach
        staging: comedi: 8255_pci: fix possible NULL deref during detach
        staging: comedi: ni_daq_700: fix dio subdevice regression
        ...
      490916d6
    • Linus Torvalds's avatar
      Merge tag 'driver-core-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 299650ca
      Linus Torvalds authored
      
      
      Pull driver core fixes from Greg Kroah-Hartman:
       "Here are a number of firmware core fixes for 3.7, and some other minor
        fixes.  And some documentation updates thrown in for good measure.
      
        All have been in the linux-next tree for a while.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">
      
      * tag 'driver-core-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation:Chinese translation of Documentation/arm64/memory.txt
        Documentation:Chinese translation of Documentation/arm64/booting.txt
        Documentation:Chinese translation of Documentation/IRQ.txt
        firmware loader: document kernel direct loading
        sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat()
        dynamic_debug: Remove unnecessary __used
        firmware loader: sync firmware cache by async_synchronize_full_domain
        firmware loader: let direct loading back on 'firmware_buf'
        firmware loader: fix one reqeust_firmware race
        firmware loader: cancel uncache work before caching firmware
      299650ca
    • Linus Torvalds's avatar
      Merge tag 'char-misc-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · f76ddd98
      Linus Torvalds authored
      
      
      Pull char/misc driver fixes from Greg Kroah-Hartman:
       "Here are some driver fixes for 3.7.  They include extcon driver fixes,
        a hyper-v bugfix, and two other minor driver fixes.
      
        All of these have been in the linux-next releases for a while.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">
      
      * tag 'char-misc-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        sonypi: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP
        Drivers: hv: Cleanup error handling in vmbus_open()
        extcon : register for cable interest by cable name
        extcon: trivial: kfree missed from remove path
        extcon: driver model release call not needed
        extcon: MAX77693: Add platform data for MUIC device to initialize registers
        extcon: max77693: Use max77693_update_reg for rmw operations
        extcon: Fix kerneldoc for extcon_set_cable_state and extcon_set_cable_state_
        extcon: adc-jack: Add missing MODULE_LICENSE
        extcon: adc-jack: Fix checking return value of request_any_context_irq
        extcon: Fix return value in extcon_register_interest()
        extcon: unregister compat link on cleanup
        extcon: Unregister compat class at module unload to fix oops
        extcon: optimising the check_mutually_exclusive function
        extcon: standard cable names definition and declaration changed
        extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach
        extcon: Remove duplicate inclusion of extcon.h header file
      f76ddd98
    • Linus Torvalds's avatar
      VFS: don't do protected {sym,hard}links by default · 561ec64a
      Linus Torvalds authored
      In commit 800179c9 ("This adds symlink and hardlink restrictions to
      the Linux VFS"), the new link protections were enabled by default, in
      the hope that no actual application would care, despite it being
      technically against legacy UNIX (and documented POSIX) behavior.
      
      However, it does turn out to break some applications.  It's rare, and
      it's unfortunate, but it's unacceptable to break existing systems, so
      we'll have to default to legacy behavior.
      
      In particular, it has broken the way AFD distributes files, see
      
        http://www.dwd.de/AFD/
      
      
      
      along with some legacy scripts.
      
      Distributions can end up setting this at initrd time or in system
      scripts: if you have security problems due to link attacks during your
      early boot sequence, you have bigger problems than some kernel sysctl
      setting. Do:
      
      	echo 1 > /proc/sys/fs/protected_symlinks
      	echo 1 > /proc/sys/fs/protected_hardlinks
      
      to re-enable the link protections.
      
      Alternatively, we may at some point introduce a kernel config option
      that sets these kinds of "more secure but not traditional" behavioural
      options automatically.
      
      Reported-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Reported-by: default avatarHolger Kiehl <Holger.Kiehl@dwd.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: stable@kernel.org # v3.6
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      561ec64a
    • Linus Torvalds's avatar
      Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 22e978f1
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Slightly a high amount of commits come from Adrian Knoth's HDSPM
        driver fixes.  Other than that, all small trival fixes or quirks that
        are pretty driver-specific."
      
      * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: wm8994: Only enable extra BCLK cycles when required
        ALSA: als3000: check for the kzalloc return value
        ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free
        ALSA: hda - Fix silent headphone output from Toshiba P200
        ALSA: hdspm - Fix coding style in CTL_ELEM macros
        ALSA: hdspm - Fix typo in kcontrol element on RME MADI cards
        ALSA: hdspm - Fix sync_in detection on AES/AES32
        ALSA: hdspm - Fix sync_in reporting on RME MADI cards
        ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface
        ALSA: hdspm - Fix reported autosync_sample_rate
        ALSA: hdspm - Fix sync check reporting on all RME HDSPM cards
        ALSA: hdspm - Report external rate in slave mode on PCI MADI
        ALSA: hdspm - Allow DDS/Varispeed to be set from userspace
        ALSA: hda - add dock support for Thinkpad T430
        ASoC: ux500_msp_i2s: Fix devm_* and return code merge error
        ASoC: Ux500: Dispose of device nodes correctly
      22e978f1
    • Linus Torvalds's avatar
      Merge branch 'fixes_for_linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping · ef48bfd6
      Linus Torvalds authored
      Pull DMA-mapping revert from Marek Szyprowski:
       "Due to my mistake, my previous pull request (merged as commit
        cff7b8ba: "Merge branch 'fixes_for_linus' ..") contained a patch
        which is aimed for v3.8 and lacks its dependences.  This pull request
        reverts it and fixes build break of ARM architecture."
      
      * 'fixes_for_linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
        Revert "ARM: dma-mapping: support debug_dma_mapping_error"
      ef48bfd6
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 622f202a
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "This fixes a couple of nasty page table initialization bugs which were
        causing kdump regressions.  A clean rearchitecturing of the code is in
        the works - meanwhile these are reverts that restore the
        best-known-working state of the kernel.
      
        There's also EFI fixes and other small fixes."
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, mm: Undo incorrect revert in arch/x86/mm/init.c
        x86: efi: Turn off efi_enabled after setup on mixed fw/kernel
        x86, mm: Find_early_table_space based on ranges that are actually being mapped
        x86, mm: Use memblock memory loop instead of e820_RAM
        x86, mm: Trim memory in memblock to be page aligned
        x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt
        x86/efi: Fix oops caused by incorrect set_memory_uc() usage
        x86-64: Fix page table accounting
        Revert "x86/mm: Fix the size calculation of mapping tables"
        MAINTAINERS: Add EFI git repository location
      622f202a
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6a2e52f8
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Most of the kernel diffstat relates to a group of Intel P6 and KNC
        (Xeon-Phi Knights Corner) PMU driver fixes, neither of which is in
        heavy use, so we took the fixes.
      
        The rest is diverse smallish fixes to the tooling and kernel side."
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86: Remove unused variable in nhmex_rbox_alter_er()
        perf/x86: Enable overflow on Intel KNC with a custom knc_pmu_handle_irq()
        perf/x86: Remove cpuc->enable check on Intl KNC event enable/disable
        perf/x86: Make Intel KNC use full 40-bit width of counters
        perf/x86/uncore: Handle pci_read_config_dword() errors
        perf/x86: Remove P6 cpuc->enabled check
        perf/x86: Update/fix generic events on P6 PMU
        perf/x86: Fix P6 FP_ASSIST event constraint
        perf, cpu hotplug: Use cached value of smp_processor_id()
        perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled
        x86/perf: Fix virtualization sanity check
        perf test: Fix exclude_guest parse events tests
        perf tools: do not flush maps on COMM for perf report
        perf help: Fix --help for builtins
        perf trace: Check if sample raw_data field is set
        perf trace: Validate syscall id before growing syscall table
      6a2e52f8
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · f48d4277
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "This has our series of fixes for the next rc.  The biggest batch is
        from Jan Schmidt, fixing up some problems in our subvolume quota code
        and fixing btrfs send/receive to work with the new extended inode
        refs."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: do not bug when we fail to commit the transaction
        Btrfs: fix memory leak when cloning root's node
        Btrfs: Use btrfs_update_inode_fallback when creating a snapshot
        Btrfs: Send: preserve ownership (uid and gid) also for symlinks.
        Btrfs: fix deadlock caused by the nested chunk allocation
        btrfs: Return EINVAL when length to trim is less than FSB
        Btrfs: fix memory leak in btrfs_quota_enable()
        Btrfs: send correct rdev and mode in btrfs-send
        Btrfs: extended inode refs support for send mechanism
        Btrfs: Fix wrong error handling code
        Fix a sign bug causing invalid memory access in the ino_paths ioctl.
        Btrfs: comment for loop in tree_mod_log_insert_move
        Btrfs: fix extent buffer reference for tree mod log roots
        Btrfs: determine level of old roots
        Btrfs: tree mod log's old roots could still be part of the tree
        Btrfs: fix a tree mod logging issue for root replacement operations
        Btrfs: don't put removals from push_node_left into tree mod log twice
      f48d4277
  6. Oct 26, 2012
    • Ingo Molnar's avatar
      Merge tag 'efi-for-3.7' of... · 8b724e2a
      Ingo Molnar authored
      Merge tag 'efi-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi
      
       into x86/urgent
      
      Pull EFI fixes from Matt Fleming:
      
       "Fix oops with EFI variables on mixed 32/64-bit firmware/kernels and
        document EFI git repository location on kernel.org."
      
      Conflicts:
      	arch/x86/include/asm/efi.h
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8b724e2a
    • Marek Szyprowski's avatar
      Revert "ARM: dma-mapping: support debug_dma_mapping_error" · 69757589
      Marek Szyprowski authored
      This reverts commit 871ae57a
      
      , which is
      scheduled for v3.8 and accidently got into v3.7-rc series.
      
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      69757589
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · b394209c
      Linus Torvalds authored
      Pull drm radeon fixes from Dave Airlie:
       "Just radeon fixes in this one:
         - some new PCI IDs
         - ATPX regression fix
         - async VM regression fixes
         - some module options fixes"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon: fix ATPX regression in acpi rework
        drm/radeon: fix ATPX function documentation
        drm/radeon: move the retry to gem_object_create
        drm/radeon: move size limits to gem_object_create.
        drm/radeon: use vzalloc for gart pages
        drm/radeon: fix and simplify pot argument checks v3
        drm/radeon: fix header size estimation in VM code
        drm/radeon: remove set_page check from VM code
        drm/radeon: fix si_set_page v2
        drm/radeon: fix cayman_vm_set_page v2
        drm/radeon: fix PFP sync in vm_flush
        drm/radeon: add error output if VM CS fails on cayman
        drm/radeon: give each backlight a unique id
        drm/radeon: fix sparse warning
        drm/radeon: add some new SI PCI ids
      b394209c
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.7-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · fec4fba6
      Linus Torvalds authored
      Pull NFS bugfixes from Trond Myklebust:
      
       - Fix the NFSv2/v3 kernel statd protocol, which broke due to net
         namespace related changes.
      
       - Fix a number of races in the SUNRPC TCP disconnect/reconnect code.
      
      * tag 'nfs-for-3.7-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        LOCKD: Clear ln->nsm_clnt only when ln->nsm_users is zero
        LOCKD: fix races in nsm_client_get
        SUNRPC: Get rid of the xs_error_report socket callback
        SUNRPC: Prevent races in xs_abort_connection()
        Revert "SUNRPC: Ensure we close the socket on EPIPE errors too..."
        SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT
      fec4fba6
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 96fb1a24
      Dave Airlie authored
      Alex writes:
      "Fixes pull request for radeon.  The main things here are
      fixing a ATPX regression from the acpi rework, fixing some
      fallout from the async VM work, and fixing some module options
      that were broken in certain cases.  Other than that, mainly
      just bug fixes."
      
      * 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: fix ATPX regression in acpi rework
        drm/radeon: fix ATPX function documentation
        drm/radeon: move the retry to gem_object_create
        drm/radeon: move size limits to gem_object_create.
        drm/radeon: use vzalloc for gart pages
        drm/radeon: fix and simplify pot argument checks v3
        drm/radeon: fix header size estimation in VM code
        drm/radeon: remove set_page check from VM code
        drm/radeon: fix si_set_page v2
        drm/radeon: fix cayman_vm_set_page v2
        drm/radeon: fix PFP sync in vm_flush
        drm/radeon: add error output if VM CS fails on cayman
        drm/radeon: give each backlight a unique id
        drm/radeon: fix sparse warning
        drm/radeon: add some new SI PCI ids
      96fb1a24
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's fixes) · 2ab3f29d
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "18 total.  15 fixes and some updates to a device_cgroup patchset which
        bring it up to date with the version which I should have merged in the
        first place."
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (18 patches)
        fs/compat_ioctl.c: VIDEO_SET_SPU_PALETTE missing error check
        gen_init_cpio: avoid stack overflow when expanding
        drivers/rtc/rtc-imxdi.c: add missing spin lock initialization
        mm, numa: avoid setting zone_reclaim_mode unless a node is sufficiently distant
        pidns: limit the nesting depth of pid namespaces
        drivers/dma/dw_dmac: make driver's endianness configurable
        mm/mmu_notifier: allocate mmu_notifier in advance
        tools/testing/selftests/epoll/test_epoll.c: fix build
        UAPI: fix tools/vm/page-types.c
        mm/page_alloc.c:alloc_contig_range(): return early for err path
        rbtree: include linux/compiler.h for definition of __always_inline
        genalloc: stop crashing the system when destroying a pool
        backlight: ili9320: add missing SPI dependency
        device_cgroup: add proper checking when changing default behavior
        device_cgroup: stop using simple_strtoul()
        device_cgroup: rename deny_all to behavior
        cgroup: fix invalid rcu dereference
        mm: fix XFS oops due to dirty pages without buffers on s390
      2ab3f29d
    • Jason Gerecke's avatar
      Input: wacom - add touch sensor support for Cintiq 24HD touch · b1e4279e
      Jason Gerecke authored
      
      
      Decode multitouch reports from the touch sensor of the Cintiq 24HD
      touch.
      
      Signed-off-by: default avatarJason Gerecke <killertofu@gmail.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b1e4279e
    • Jason Gerecke's avatar
      Input: wacom - handle split-sensor devices with internal hubs · aea2bf6a
      Jason Gerecke authored
      
      
      Like our other pen-and-touch products, the Cintiq 24HD touch needs data
      to be shared between its two sensors to facilitate proximity-based palm
      rejection.
      
      Unlike other tablets that report sensor data through separate interfaces
      of the same USB device, the Cintiq 24HD touch has separate USB devices
      that are connected to an internal USB hub.
      
      This patch makes it possible to designate the USB VID/PID of the other
      device so that the two may share data.  To ensure we don't accidentally
      link to a sensor from a physically separate device (if several have been
      plugged in), we limit the search to siblings (i.e., devices directly
      connected to the same hub).
      
      Signed-off-by: default avatarJason Gerecke <killertofu@gmail.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aea2bf6a
    • H. Peter Anvin's avatar
      Makefile: Documentation for external tool should be correct · 2008713c
      H. Peter Anvin authored
      
      
      If one includes documentation for an external tool, it should be
      correct.  This is not:
      
      1. Overriding the input to rngd should typically be neither
         necessary nor desired.  This is especially so since newer
         versions of rngd support a number of different *types* of sources.
      2. The default kernel-exported device is called /dev/hwrng not
         /dev/hwrandom nor /dev/hw_random (both of which were used in the
         past; however, kernel and udev seem to have converged on
         /dev/hwrng.)
      
      Overall it is better if the documentation for rngd is kept with rngd
      rather than in a kernel Makefile.
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2008713c
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 6bb1e381
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A random collection of various fixes, mainly from Arnd and a few other
        people.  Not thing really stands out here."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: drop experimental status for hotplug and Thumb2
        ARM: 7560/1: SMP_TWD: use DIV_ROUND_CLOSEST() for periodic mode
        ARM: 7559/1: smp: switch away from the idmap before updating init_mm.mm_count
        ARM: 7556/1: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD
        ARM: 7555/1: kexec: fix segment memory addresses check
        ARM: warnings in arch/arm/include/asm/uaccess.h
        ARM: binfmt_flat: unused variable 'persistent'
        ARM: be really quiet when building with 'make -s'
        ARM: pass -marm to gcc by default for both C and assembler
        ARM: Xen: fix initial build problems
        ARM: export default read_current_timer
        ARM: Fix another build warning in arch/arm/mm/alignment.c
        ARM: export set_irq_flags
        ARM: kprobes: make more tests conditional
      6bb1e381
    • Linus Torvalds's avatar
      Merge branch 'fixes_for_linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping · cff7b8ba
      Linus Torvalds authored
      Pull CMA and DMA-mapping fixes from Marek Szyprowski:
       "This consists mainly of a set of one-liner fixes and cleanups for a
        few minor issues identified in both Contiguous Memory Allocator code
        and ARM DMA-mapping subsystem."
      
      * 'fixes_for_linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
        ARM: mm: Remove unused arm_vmregion priv field
        ARM: dma-mapping: fix build warning in __dma_alloc()
        ARM: dma-mapping: support debug_dma_mapping_error
        mm: cma: alloc_contig_range: return early for err path
        drivers: cma: Fix wrong CMA selected region size default value
        drivers: dma-coherent: Fix typo in dma_mmap_from_coherent documentation
        drivers: dma-contiguous: Don't redefine SZ_1M
      cff7b8ba
    • Yinghai Lu's avatar
      x86, mm: Undo incorrect revert in arch/x86/mm/init.c · f82f64dd
      Yinghai Lu authored
      Commit
      
          844ab6f9 x86, mm: Find_early_table_space based on ranges that are actually being mapped
      
      added back some lines back wrongly that has been removed in commit
      
          7b16bbf9
      
       Revert "x86/mm: Fix the size calculation of mapping tables"
      
      remove them again.
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/CAE9FiQW_vuaYQbmagVnxT2DGsYc=9tNeAbdBq53sYkitPOwxSQ@mail.gmail.com
      
      
      Acked-by: default avatarJacob Shin <jacob.shin@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      f82f64dd
    • Kees Cook's avatar
      fs/compat_ioctl.c: VIDEO_SET_SPU_PALETTE missing error check · 12176503
      Kees Cook authored
      
      
      The compat ioctl for VIDEO_SET_SPU_PALETTE was missing an error check
      while converting ioctl arguments.  This could lead to leaking kernel
      stack contents into userspace.
      
      Patch extracted from existing fix in grsecurity.
      
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Brad Spengler <spender@grsecurity.net>
      Cc: PaX Team <pageexec@freemail.hu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      12176503
    • Kees Cook's avatar
      gen_init_cpio: avoid stack overflow when expanding · 20f1de65
      Kees Cook authored
      
      
      Fix possible overflow of the buffer used for expanding environment
      variables when building file list.
      
      In the extremely unlikely case of an attacker having control over the
      environment variables visible to gen_init_cpio, control over the
      contents of the file gen_init_cpio parses, and gen_init_cpio was built
      without compiler hardening, the attacker can gain arbitrary execution
      control via a stack buffer overflow.
      
        $ cat usr/crash.list
        file foo ${BIG}${BIG}${BIG}${BIG}${BIG}${BIG} 0755 0 0
        $ BIG=$(perl -e 'print "A" x 4096;') ./usr/gen_init_cpio usr/crash.list
        *** buffer overflow detected ***: ./usr/gen_init_cpio terminated
      
      This also replaces the space-indenting with tabs.
      
      Patch based on existing fix extracted from grsecurity.
      
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Brad Spengler <spender@grsecurity.net>
      Cc: PaX Team <pageexec@freemail.hu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      20f1de65
    • Jan Luebbe's avatar
      drivers/rtc/rtc-imxdi.c: add missing spin lock initialization · fee0de77
      Jan Luebbe authored
      
      
      Signed-off-by: default avatarJan Luebbe <jlu@pengutronix.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Roland Stigge <stigge@antcom.de>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Tested-by: default avatarRoland Stigge <stigge@antcom.de>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fee0de77
    • David Rientjes's avatar
      mm, numa: avoid setting zone_reclaim_mode unless a node is sufficiently distant · 6b187d02
      David Rientjes authored
      Commit 957f822a
      
       ("mm, numa: reclaim from all nodes within reclaim
      distance") caused zone_reclaim_mode to be set for all systems where two
      nodes are within RECLAIM_DISTANCE of each other.  This is the opposite
      of what we actually want: zone_reclaim_mode should be set if two nodes
      are sufficiently distant.
      
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Reported-by: default avatarJulian Wollrath <jwollrath@web.de>
      Tested-by: default avatarJulian Wollrath <jwollrath@web.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Patrik Kullman <patrik.kullman@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6b187d02
    • Andrew Vagin's avatar
      pidns: limit the nesting depth of pid namespaces · f2302505
      Andrew Vagin authored
      
      
      'struct pid' is a "variable sized struct" - a header with an array of
      upids at the end.
      
      The size of the array depends on a level (depth) of pid namespaces.  Now a
      level of pidns is not limited, so 'struct pid' can be more than one page.
      
      Looks reasonable, that it should be less than a page.  MAX_PIS_NS_LEVEL is
      not calculated from PAGE_SIZE, because in this case it depends on
      architectures, config options and it will be reduced, if someone adds a
      new fields in struct pid or struct upid.
      
      I suggest to set MAX_PIS_NS_LEVEL = 32, because it saves ability to expand
      "struct pid" and it's more than enough for all known for me use-cases.
      When someone finds a reasonable use case, we can add a config option or a
      sysctl parameter.
      
      In addition it will reduce the effect of another problem, when we have
      many nested namespaces and the oldest one starts dying.
      zap_pid_ns_processe will be called for each namespace and find_vpid will
      be called for each process in a namespace.  find_vpid will be called
      minimum max_level^2 / 2 times.  The reason of that is that when we found a
      bit in pidmap, we can't determine this pidns is top for this process or it
      isn't.
      
      vpid is a heavy operation, so a fork bomb, which create many nested
      namespace, can make a system inaccessible for a long time.  For example my
      system becomes inaccessible for a few minutes with 4000 processes.
      
      [akpm@linux-foundation.org: return -EINVAL in response to excessive nesting, not -ENOMEM]
      Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2302505
    • Hein Tibosch's avatar
      drivers/dma/dw_dmac: make driver's endianness configurable · d5ea7b5e
      Hein Tibosch authored
      The dw_dmac driver was originally developed for avr32 to be used with the
      Synopsys DesignWare AHB DMA controller.  Starting from 2.6.38, access to
      the device's i/o memory was done with the little-endian readl/writel
      functions(1)
      
      This broke the driver for the avr32 platform, because it needs big
      (native) endian accessors.  This patch makes the endianness configurable
      using 'DW_DMAC_BIG_ENDIAN_IO', which will default be true for AVR32
      
      I submitted this patch before(2) but then waited for Andy to finish other
      changes to the same module(3).
      
      (1) https://patchwork.kernel.org/patch/608211
      (2) https://lkml.org/lkml/2012/8/26/148
      (3) https://lkml.org/lkml/2012/9/21/173
      
      
      
      Signed-off-by: default avatarHein Tibosch <hein_tibosch@yahoo.es>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
      Cc: Havard Skinnemoen <havard@skinnemoen.net>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d5ea7b5e
    • Gavin Shan's avatar
      mm/mmu_notifier: allocate mmu_notifier in advance · 35cfa2b0
      Gavin Shan authored
      While allocating mmu_notifier with parameter GFP_KERNEL, swap would start
      to work in case of tight available memory.  Eventually, that would lead to
      a deadlock while the swap deamon swaps anonymous pages.  It was caused by
      commit e0f3c3f7
      
       ("mm/mmu_notifier: init notifier if necessary").
      
        =================================
        [ INFO: inconsistent lock state ]
        3.7.0-rc1+ #518 Not tainted
        ---------------------------------
        inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
        kswapd0/35 [HC0[0]:SC0[0]:HE1:SE1] takes:
         (&mapping->i_mmap_mutex){+.+.?.}, at: page_referenced+0x9c/0x2e0
        {RECLAIM_FS-ON-W} state was registered at:
           mark_held_locks+0x86/0x150
           lockdep_trace_alloc+0x67/0xc0
           kmem_cache_alloc_trace+0x33/0x230
           do_mmu_notifier_register+0x87/0x180
           mmu_notifier_register+0x13/0x20
           kvm_dev_ioctl+0x428/0x510
           do_vfs_ioctl+0x98/0x570
           sys_ioctl+0x91/0xb0
           system_call_fastpath+0x16/0x1b
        irq event stamp: 825
        hardirqs last  enabled at (825): _raw_spin_unlock_irq+0x30/0x60
        hardirqs last disabled at (824): _raw_spin_lock_irq+0x19/0x80
        softirqs last  enabled at (0): copy_process+0x630/0x17c0
        softirqs last disabled at (0): (null)
        ...
      
      Simply back out the above commit, which was a small performance
      optimization.
      
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Reported-by: default avatarAndrea Righi <andrea@betterlinux.com>
      Tested-by: default avatarAndrea Righi <andrea@betterlinux.com>
      Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Cc: Sagi Grimberg <sagig@mellanox.co.il>
      Cc: Haggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      35cfa2b0