1. 04 Apr, 2012 15 commits
    • Linus Torvalds's avatar
      Merge branch 'selinux' ("struct common_audit_data" sanitizer) · a5149bf3
      Linus Torvalds authored
      Merge common_audit_data cleanup patches from Eric Paris.
      
      This is really too late, but it's a long-overdue cleanup of the costly
      wrapper functions for the security layer.
      
      The "struct common_audit_data" is used all over in critical paths,
      allocated and initialized on the stack.  And used to be much too large,
      causing not only unnecessarily big stack frames but the clearing of the
      (mostly useless) data was also very visible in profiles.
      
      As a particular example, in one microbenchmark for just doing "stat()"
      over files a lot, selinux_inode_permission() used 7% of the CPU time.
      That's despite the fact that it doesn't actually *do* anything: it is
      just a helper wrapper function in the selinux security layer.
      
      This patch-series shrinks "struct common_audit_data" sufficiently that
      code generation for these kinds of wrapper functions is improved
      noticeably, and we spend much less time just initializing data that we
      will never use.
      
      The functions still get called all the time, and it still shows up at
      3.5+% in my microbenchmark, but it's quite a bit lower down the list,
      and much less noticeable.
      
      * Emailed patches from Eric Paris <eparis@redhat.com>:
        lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data'
        SELinux: do not allocate stack space for AVC data unless needed
        SELinux: remove avd from slow_avc_audit()
        SELinux: remove avd from selinux_audit_data
        LSM: shrink the common_audit_data data union
        LSM: shrink sizeof LSM specific portion of common_audit_data
      a5149bf3
    • Linus Torvalds's avatar
      Merge tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 3ff8f932
      Linus Torvalds authored
      Pull a single regmap fix from Mark Brown:
       "A simple bug that's been lurking for a while but not terribly visible
        since a high proportion of chips have no register 0 so the normal
        failure is that we end up doing a bit of extra I/O."
      
      * tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: rbtree: Fix register default look-up in sync
      3ff8f932
    • Linus Torvalds's avatar
      Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 4a1e8ebc
      Linus Torvalds authored
      Pull regulator fixes from Mark Brown:
       "A bunch of smallish fixes that came up during the merge window as
        things got more testing - even more fixes from Axel, a fix for error
        handling in more complex systems using -EPROBE_DEFER and a couple of
        small fixes for the new dummy regulators."
      
      * tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: Remove non-existent parameter from fixed-helper.c kernel doc
        regulator: Fix setting new voltage in s5m8767_set_voltage
        regulator: fix sysfs name collision between dummy and fixed dummy regulator
        regulator: Fix deadlock on removal of regulators with supplies
        regulator: Fix comments in include/linux/regulator/machine.h
        regulator: Only update [LDOx|DCx]_HIB_MODE bits in wm8350_[ldo|dcdc]_set_suspend_disable
        regulator: Fix setting low power mode for wm831x aldo
        regulator: Return microamps in wm8350_isink_get_current
        regulator: wm8350: Fix the logic to choose best current limit setting
        regulator: wm831x-isink: Fix the logic to choose best current limit setting
        regulator: wm831x-dcdc: Fix the logic to choose best current limit setting
        regulator: anatop: patching to device-tree property "reg".
        regulator: Do proper shift to set correct bit for DC[2|5]_HIB_MODE setting
        regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable
        regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error path
        regulator: Fix set and get current limit for wm831x_buckv
        regulator: tps6586x: Fix list minimal voltage setting for LDO0
      4a1e8ebc
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 66cfb327
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/p4: Add format attributes
        tracing, sched, vfs: Fix 'old_pid' usage in trace_sched_process_exec()
      66cfb327
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 67422598
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, kvm: Call restore_sched_clock_state() only after %gs is initialized
        x86: Use -mno-avx when available
        x86: Remove the ancient and deprecated disable_hlt() and enable_hlt() facility
        x86: Preserve lazy irq disable semantics in fixup_irqs()
      67422598
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 20d9d9a0
      Linus Torvalds authored
      Pull hwmon patches from Guenter Roeck:
       - Fix crash in ad7314 driver
       - Add support for AMD Trinity CPUs to k10temp driver
       - Fix __initdata/__initconst mixup in w83627ehf driver
       - Fix runtime warnings in acpi_power_meter and max6639 drivers
       - Fix build warnings in adm1031, f75375s, sht15, and gpio-fan drivers
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (ad7314) Adds missing spi_dev initialization
        hwmon: (k10temp) Add support for AMD Trinity CPUs
        hwmon: (w83627ehf) mark const init data with __initconst instead of __initdata
        hwmon: (acpi_power_meter) fix lockdep spew due to non-static lock class
        hwmon: (adm1031) Fix compiler warning
        hwmon: (f75375s) Fix warning message seen in some configurations
        hwmon: (max6639) Convert to dev_pm_ops
        hwmon: (sht15) Fix Kconfig dependencies
        hwmon: (gpio-fan) Fix Kconfig dependencies
      20d9d9a0
    • Linus Torvalds's avatar
      Merge tag 'mce-fix-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · 7114a72f
      Linus Torvalds authored
      Pull MCE fixlet from Borislav Petkov:
       "One fix which makes MCE decoding much more "liberal" wrt families."
      
      * tag 'mce-fix-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        MCE, AMD: Drop too granulary family model checks
      7114a72f
    • Linus Torvalds's avatar
      Merge tag 'md-3.4-fixes' of git://neil.brown.name/md · 36bbffc0
      Linus Torvalds authored
      Pull assorted md fixes from Neil Brown:
       - some RAID levels didn't clear up properly if md_integrity_register
        failed
       - a 'check' of RAID5/RAID6 doesn't actually read any data since a
         recent patch - so fix that (and mark for -stable)
       - a couple of other minor bugs.
      
      * tag 'md-3.4-fixes' of git://neil.brown.name/md:
        md/raid1,raid10: don't compare excess byte during consistency check.
        md/raid5: Fix a bug about judging if the operation is syncing or replacing
        md/raid1:Remove unnecessary rcu_dereference(conf->mirrors[i].rdev).
        md: Avoid OOPS when reshaping raid1 to raid0
        md/raid5: fix handling of bad blocks during recovery.
        md/raid1: If md_integrity_register() failed,run() must free the mem
        md/raid0: If md_integrity_register() fails, raid0_run() must free the mem.
        md/linear: If md_integrity_register() fails, linear_run() must free the mem.
      36bbffc0
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 20a2a811
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Nothing too big here, just small fixes."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: fix more fallout from 9f97da78 (Disintegrate asm/system.h for ARM)
        ARM: fix bios32.c build warning
        ARM: 7337/1: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms
        ARM: fix missing bug.h include in arch/arm/kernel/insn.c
        ARM: sa11x0: fix build errors from DMA engine API updates
      20a2a811
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · a92bc5a6
      Linus Torvalds authored
      Pull Sparc fixes from David Miller:
       "One build regression and one serial probe regression fix on sparc."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        serial/sunzilog: fix keyboard on SUN SPARCstation
        sparc: pgtable_64: change include order
      a92bc5a6
    • Paul Gortmaker's avatar
      avr32: fix nop compile fails from system.h split up · 167d8215
      Paul Gortmaker authored
      To fix:
      
        In file included from kernel/exit.c:61:
        arch/avr32/include/asm/mmu_context.h: In function 'enable_mmu':
        arch/avr32/include/asm/mmu_context.h:135: error: implicit declaration of function 'nop'
      
      It needs an include of the new file created in commit ae473946
      ("Disintegrate asm/system.h for AVR32"), but since that file only
      contains "nop", and since other arch already have precedent of putting
      nop in asm/barrier.h we should just delete the new file and put nop in
      barrier.h
      Suggested-and-acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      167d8215
    • Linus Torvalds's avatar
      Revert "nouveau/bios: Fix tracking of BIOS image data" · f3718a81
      Linus Torvalds authored
      This reverts commit d06221c0.
      
      It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(),
      apparently because the code ends up trying to free somethng that was
      never kmalloced in the first place.
      
      BenH points out that the patch was untested and wasn't meant to go into
      the upstream kernel that quickly in the first place.
      
      Backtrace:
        bios_shadow
        bios_shadow_prom
        nv_mask
        init_io
        bios_shadow
        nouveau_bios_init
        NVReadVgaCrtc
        NVSetOwner
        nouveau_card_init
        nouveau_load
      Reported-by: default avatarMeelis Roos <mroos@linux.ee>
      Requested-by: default avatarDave Airlie <airlied@gmail.com>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f3718a81
    • Borislav Petkov's avatar
      MCE, AMD: Drop too granulary family model checks · ec3e82d6
      Borislav Petkov authored
      MCA details seldom change inbetween the models of a family so don't
      be too conservative and enable decoding on everything starting from
      K8 onwards. Minor adjustments can come in later but most importantly,
      we have some decoding infrastructure in place for upcoming models by
      default.
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      ec3e82d6
    • Sam Ravnborg's avatar
      serial/sunzilog: fix keyboard on SUN SPARCstation · ca6f327d
      Sam Ravnborg authored
      The keyboard on my SUN SPARCstation 5 no longer worked.
      
          The culprint was: d4e33fac
          ("serial: Kill off NO_IRQ")
      
      Fix up logic for no irq / irq so the keyboard works again.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca6f327d
    • Graeme Smecher's avatar
      hwmon: (ad7314) Adds missing spi_dev initialization · e16de913
      Graeme Smecher authored
      This driver was recently moved from IIO (where it worked) to hwmon (where
      it doesn't.) This breakage occured because the hwmon version neglected to
      correctly initialize a reference to spi_dev in its drvdata. The result is a
      segfault every time the temperature is queried.
      Signed-off-by: default avatarGraeme Smecher <gsmecher@threespeedlogic.com>
      Cc: stable@vger.kernel.org # 3.2+
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      e16de913
  2. 03 Apr, 2012 24 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes-intel' of git://people.freedesktop.org/~airlied/linux · 01627d96
      Linus Torvalds authored
      Pull drm update from Dave Airlie:
       "This pull just contains a forward of the Intel fixes from Daniel.
      
        The only annoyance is the RC6 enable, which really should have made
        -next, but since Ubuntu are shipping it I reckon its getting a good
        testing now by the time 3.4 comes out.
      
        The pull from Daniel contains his pull message to me:
      
          "A few patches for 3.4, major part is 3 regression fixes:
           - ppgtt broke hibernate on snb/ivb.  Somehow our QA claims that it
             still works, which is why this has not been caught earlier.
           - ppgtt flails in combination with dmar.  I kinda expected this one :(
           - fence handling bugfix for gen2/3.  Iirc this one is about a year
             old, fix curtesy Chris Wilson.  I've created an shockingly simple
             i-g-t test to catch this in the future."
      
           Wrt regressions I've just got a report that gmbus (newly enabled
           again in 3.4) is a bit noisy.  I'm looking into this atm.
      
           Also included are the rc6 enable patches for snb from Eugeni.  I
           wanted to include these in the main 3.4 pull but screwed it up.
           Please hit me.  Imo these kind of patches really should go in
           before -rc1, but in thise case rc6 has brought us tons of press and
           guinea pigs^W^W testers and ubuntu is already running with it.  So
           I estimate a pretty small chance for this to blow up.
      
           And some smaller things:
            - two minor locking snafus
            - server gt2 ivb pciid
            - 2 patches to sanitize the register state left behind by the bios
              some more
            - 2 new quirk entries
            - cs readback trick against missed IRQs from ivb also enabled on snb
            - sprite fix from Jesse"
      
      Let's see if the "enable RC6 on sandybridge" finally works and sticks.
      I've been enabling it by hand (i915.i915_enable_rc6=1) for several
      months on my Macbook Air, and it definitely makes a difference (and has
      worked for me).  But every time we enabled it before it showed some odd
      hw buglet for *somebody*.
      
      This time it's all good, I'm sure.
      
      * 'drm-fixes-intel' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: treat src w & h as fixed point in sprite handling code
        drm/i915: no-lvds quirk on MSI DC500
        drm/i915: Add lock on drm_helper_resume_force_mode
        drm/i915: don't leak struct_mutex lock on ppgtt init failures
        drm/i915: disable ppgtt on snb when dmar is enabled
        drm/i915: add Ivy Bridge GT2 Server entries
        drm/i915: properly clear SSC1 bit in the pch refclock init code
        drm/i915: apply CS reg readback trick against missed IRQ on snb
        drm/i915: quirk away broken OpRegion VBT
        drm/i915: enable plain RC6 on Sandy Bridge by default
        drm/i915: allow to select rc6 modes via kernel parameter
        drm/i915: Mark untiled BLT commands as fenced on gen2/3
        drm/i915: properly restore the ppgtt page directory on resume
        drm/i915: Sanitize BIOS debugging bits from PIPECONF
      01627d96
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · e1a7eb08
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Mainly nouveau fixes, one for a regressions in -rc1, fixes for booting
        on a ppc G5, and a Kconfig fix.  Two radeon fixes, one oops, one s/r
        fix.  One udl mmap fix.  And one core drm fix to stop bad fbdev apps
        overwriting bits of ram."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm: Validate requested virtual size against allocated fb size
        drm/radeon: Don't dereference possibly-NULL pointer.
        mm, drm/udl: fixup vma flags on mmap
        drm/radeon/kms: fix fans after resume
        nouveau/bios: Fix tracking of BIOS image data
        nouveau: Fix crash when pci_ram_rom() returns a size of 0
        drm/nouveau: select POWER_SUPPLY
        drm/nouveau: inform userspace of relaxed kernel subchannel requirements
        Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"
        drm/nouveau: oops, create m2mf for nvd9 too
      e1a7eb08
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze · 464662b9
      Linus Torvalds authored
      Pull arch/microblaze fixes from Michal Simek.
      
      * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Fix ret_from_fork declaration
        microblaze: Do not use tlb_skip in early_printk
        microblaze: Add missing headers caused by disintegration asm/system.h
        microblaze: Fix stack usage in PAGE_SIZE copy_tofrom_user
        microblaze: Fix tlb_skip variable on noMMU system
        microblaze: Fix __futex_atomic_op macro register usage
      464662b9
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 1e649afd
      Linus Torvalds authored
      Pull m68k fixes from Geert Uytterhoeven:
       "Here are a few fixes for the m68k architecture.  Nothing fancy this
        time, just a build fix for the asm/system.h disintegration, and two
        fixes for missing platform checks (one got in during last merge
        window), which can cause crashes in multi-platform kernels."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/q40: Add missing platform check before registering platform devices
        m68k/mac: Add missing platform check before registering platform devices
        m68k: include asm/cmpxchg.h in our m68k atomic.h
      1e649afd
    • Linus Torvalds's avatar
      lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data' · b61c37f5
      Linus Torvalds authored
      It just bloats the audit data structure for no good reason, since the
      only time those fields are filled are just before calling the
      common_lsm_audit() function, which is also the only user of those
      fields.
      
      So just make them be the arguments to common_lsm_audit(), rather than
      bloating that structure that is passed around everywhere, and is
      initialized in hot paths.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b61c37f5
    • Eric Paris's avatar
      SELinux: do not allocate stack space for AVC data unless needed · 3f0882c4
      Eric Paris authored
      Instead of declaring the entire selinux_audit_data on the stack when we
      start an operation on declare it on the stack if we are going to use it.
      We know it's usefulness at the end of the security decision and can declare
      it there.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f0882c4
    • Eric Paris's avatar
      SELinux: remove avd from slow_avc_audit() · f8294f11
      Eric Paris authored
      We don't use the argument, so remove it.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f8294f11
    • Eric Paris's avatar
      SELinux: remove avd from selinux_audit_data · 7f6a47cf
      Eric Paris authored
      We do not use it.  Remove it.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7f6a47cf
    • Eric Paris's avatar
      LSM: shrink the common_audit_data data union · 48c62af6
      Eric Paris authored
      After shrinking the common_audit_data stack usage for private LSM data I'm
      not going to shrink the data union.  To do this I'm going to move anything
      larger than 2 void * ptrs to it's own structure and require it to be declared
      separately on the calling stack.  Thus hot paths which don't need more than
      a couple pointer don't have to declare space to hold large unneeded
      structures.  I could get this down to one void * by dealing with the key
      struct and the struct path.  We'll see if that is helpful after taking care of
      networking.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      48c62af6
    • Eric Paris's avatar
      LSM: shrink sizeof LSM specific portion of common_audit_data · 3b3b0e4f
      Eric Paris authored
      Linus found that the gigantic size of the common audit data caused a big
      perf hit on something as simple as running stat() in a loop.  This patch
      requires LSMs to declare the LSM specific portion separately rather than
      doing it in a union.  Thus each LSM can be responsible for shrinking their
      portion and don't have to pay a penalty just because other LSMs have a
      bigger space requirement.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3b3b0e4f
    • Dave Airlie's avatar
      Merge branch 'drm-intel-fixes' of... · e37acc0f
      Dave Airlie authored
      Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-intel-fixes
      
      From Daniel Vetter:
      
      "A few patches for 3.4, major part is 3 regression fixes:
      - ppgtt broke hibernate on snb/ivb. Somehow our QA claims that it still
       works, which is why this has not been caught earlier.
      - ppgtt flails in combination with dmar. I kinda expected this one :(
      - fence handling bugfix for gen2/3. Iirc this one is about a year old, fix
       curtesy Chris Wilson. I've created an shockingly simple i-g-t test to
       catch this in the future.
      
      Wrt regressions I've just got a report that gmbus (newly enabled again in
      3.4) is a bit noisy. I'm looking into this atm.
      
      Also included are the rc6 enable patches for snb from Eugeni. I wanted to
      include these in the main 3.4 pull but screwed it up. Please hit me. Imo
      these kind of patches really should go in before -rc1, but in thise case
      rc6 has brought us tons of press and guinea pigs^W^W testers and ubuntu is
      already running with it. So I estimate a pretty small chance for this to
      blow up.
      
      And some smaller things:
      - two minor locking snafus
      - server gt2 ivb pciid
      - 2 patches to sanitize the register state left behind by the bios some
       more
      - 2 new quirk entries
      - cs readback trick against missed IRQs from ivb also enabled on snb
      - sprite fix from Jesse"
      
      * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/i915: treat src w & h as fixed point in sprite handling code
        drm/i915: no-lvds quirk on MSI DC500
        drm/i915: Add lock on drm_helper_resume_force_mode
        drm/i915: don't leak struct_mutex lock on ppgtt init failures
        drm/i915: disable ppgtt on snb when dmar is enabled
        drm/i915: add Ivy Bridge GT2 Server entries
        drm/i915: properly clear SSC1 bit in the pch refclock init code
        drm/i915: apply CS reg readback trick against missed IRQ on snb
        drm/i915: quirk away broken OpRegion VBT
        drm/i915: enable plain RC6 on Sandy Bridge by default
        drm/i915: allow to select rc6 modes via kernel parameter
        drm/i915: Mark untiled BLT commands as fenced on gen2/3
        drm/i915: properly restore the ppgtt page directory on resume
        drm/i915: Sanitize BIOS debugging bits from PIPECONF
      e37acc0f
    • Chris Wilson's avatar
      drm: Validate requested virtual size against allocated fb size · 62fb376e
      Chris Wilson authored
      mplayer -vo fbdev tries to create a screen that is twice as tall as the
      allocated framebuffer for "doublebuffering". By default, and all in-tree
      users, only sufficient memory is allocated and mapped to satisfy the
      smallest framebuffer and the virtual size is no larger than the actual.
      For these users, we should therefore reject any userspace request to
      create a screen that requires a buffer larger than the framebuffer
      originally allocated.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=38138Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@kernel.org
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      62fb376e
    • Jesse Barnes's avatar
      drm/i915: treat src w & h as fixed point in sprite handling code · b4db1e35
      Jesse Barnes authored
      This was missed when we converted the source values to 16.16 fixed point.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b4db1e35
    • Anisse Astier's avatar
      drm/i915: no-lvds quirk on MSI DC500 · 97effadb
      Anisse Astier authored
      This hardware doesn't have an LVDS, it's a desktop box. Fix incorrect
      LVDS detection.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarAnisse Astier <anisse@astier.eu>
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      97effadb
    • Sean Paul's avatar
      drm/i915: Add lock on drm_helper_resume_force_mode · 927a2f11
      Sean Paul authored
      i915_drm_thaw was not locking the mode_config lock when calling
      drm_helper_resume_force_mode. When there were multiple wake sources,
      this caused FDI training failure on SNB which in turn corrupted the
      display.
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      927a2f11
    • Daniel Vetter's avatar
    • Peter Zijlstra's avatar
      perf/x86/p4: Add format attributes · 7b8e6da4
      Peter Zijlstra authored
      Steven reported his P4 not booting properly, the missing format
      attributes cause a NULL ptr deref. Cure this by adding the
      missing format specification.
      
      I took the format description out of the comment near
      p4_config_pack*() and hope that comment is still relatively
      accurate.
      Reported-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Reported-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Tested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1332859842.16159.227.camel@twinsSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7b8e6da4
    • NeilBrown's avatar
      md/raid1,raid10: don't compare excess byte during consistency check. · 5020ad7d
      NeilBrown authored
      When comparing two pages read from different legs of a mirror, only
      compare the bytes that were read, not the whole page.
      
      In most cases we read a whole page, but in some cases with
      bad blocks or odd sizes devices we might read fewer than that.
      
      This bug has been present "forever" but at worst it might cause
      a report of two many mismatches and generate a little bit
      extra resync IO, so there is no need to back-port to -stable
      kernels.
      Reported-by: default avatarmajianpeng <majianpeng@gmail.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      5020ad7d
    • majianpeng's avatar
      md/raid5: Fix a bug about judging if the operation is syncing or replacing · c6d2e084
      majianpeng authored
      When create a raid5 using assume-clean and echo check or repair to
      sync_action.Then component disks did not operated IO but the raid
      check/resync faster than normal.
      Because the judgement in function analyse_stripe():
      		if (do_recovery ||
      		    sh->sector >= conf->mddev->recovery_cp)
      			s->syncing = 1;
      		else
      			s->replacing = 1;
      When check or repair,the recovery_cp == MaxSectore,so syncing equal zero
      not one.
      
      This bug was introduced by commit 9a3e1101
          md/raid5:  detect and handle replacements during recovery.
      so this patch is suitable for 3.3-stable.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarmajianpeng <majianpeng@gmail.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      c6d2e084
    • majianpeng's avatar
      md/raid1:Remove unnecessary rcu_dereference(conf->mirrors[i].rdev). · a42f9d83
      majianpeng authored
      Because rde->nr_pending > 0,so can not remove this disk.
      And in any case, we aren't holding rcu_read_lock()
      Signed-off-by: default avatarmajianpeng <majianpeng@gmail.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      a42f9d83
    • Jes Sorensen's avatar
      md: Avoid OOPS when reshaping raid1 to raid0 · 24b961f8
      Jes Sorensen authored
      raid1 arrays do not have the notion of chunk size. Calculate the
      largest chunk sector size we can use to avoid a divide by zero OOPS
      when aligning the size of the new array to the chunk size.
      Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      24b961f8
    • NeilBrown's avatar
      md/raid5: fix handling of bad blocks during recovery. · 18b9837e
      NeilBrown authored
      1/ We can only treat a known-bad-block like a read-error if we
         have the data that belongs in that block.  So fix that test.
      
      2/ If we cannot recovery a stripe due to insufficient data,
         don't tell "md_done_sync" that the sync failed unless we really
         did fail something.  If we successfully record bad blocks,
         that is success.
      Reported-by: default avatar"majianpeng" <majianpeng@gmail.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      18b9837e
    • Linus Torvalds's avatar
      Merge branch 'drm-prime-dmabuf-initial' of git://people.freedesktop.org/~airlied/linux · 7d6e1cb7
      Linus Torvalds authored
      Pull dma-buf prime support from Dave Airlie:
       "This isn't a majorly urgent thing to have, but we'd like to set the
        stage for working on dma-buf support in the drm drivers for the next
        merge window, so I'd like to push in the initial submission now so
        people have something that we can build on top of.  The code just
        introduces the user interface and internal helper functions for
        drivers to use.
      
        We have driver support under development for i915, nouveau, udl on x86
        and exynos, omapdrm on arm, which we would be aiming for the next
        merge window."
      
      In the -rc1 announcement I asked for people who would use this to
      comment on it, and got severa "Yes please" from people for this and for
      HSI (that I merged earlier).
      
      So far crickets on pohmelfs and the DMA-mapping infrastructure.
      
      * 'drm-prime-dmabuf-initial' of git://people.freedesktop.org/~airlied/linux:
        drm: base prime/dma-buf support (v5)
      7d6e1cb7
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ed359a3b
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Provide device string properly for USB i2400m wimax devices, also
          don't OOPS when providing firmware string.  From Phil Sutter.
      
       2) Add support for sh_eth SH7734 chips, from Nobuhiro Iwamatsu.
      
       3) Add another device ID to USB zaurus driver, from Guan Xin.
      
       4) Loop index start in pool vector iterator is wrong causing MAC to not
          get configured in bnx2x driver, fix from Dmitry Kravkov.
      
       5) EQL driver assumes HZ=100, fix from Eric Dumazet.
      
       6) Now that skb_add_rx_frag() can specify the truesize increment
          separately, do so in f_phonet and cdc_phonet, also from Eric
          Dumazet.
      
       7) virtio_net accidently uses net_ratelimit() not only on the kernel
          warning but also the statistic bump, fix from Rick Jones.
      
       8) ip_route_input_mc() uses fixed init_net namespace, oops, use
          dev_net(dev) instead.  Fix from Benjamin LaHaise.
      
       9) dev_forward_skb() needs to clear the incoming interface index of the
          SKB so that it looks like a new incoming packet, also from Benjamin
          LaHaise.
      
      10) iwlwifi mistakenly initializes a channel entry as 2GHZ instead of
          5GHZ, fix from Stanislav Yakovlev.
      
      11) Missing kmalloc() return value checks in orinoco, from Santosh
          Nayak.
      
      12) ath9k doesn't check for HT capabilities in the right way, it is
          checking ht_supported instead of the ATH9K_HW_CAP_HT flag.  Fix from
          Sujith Manoharan.
      
      13) Fix x86 BPF JIT emission of 16-bit immediate field of AND
          instructions, from Feiran Zhuang.
      
      14) Avoid infinite loop in GARP code when registering sysfs entries.
          From David Ward.
      
      15) rose protocol uses memcpy instead of memcmp in a device address
          comparison, oops.  Fix from Daniel Borkmann.
      
      16) Fix build of lpc_eth due to dev_hw_addr_rancom() interface being
          renamed to eth_hw_addr_random().  From Roland Stigge.
      
      17) Make ipv6 RTM_GETROUTE interpret RTA_IIF attribute the same way
          that ipv4 does.  Fix from Shmulik Ladkani.
      
      18) via-rhine has an inverted bit test, causing suspend/resume
          regressions.  Fix from Andreas Mohr.
      
      19) RIONET assumes 4K page size, fix from Akinobu Mita.
      
      20) Initialization of imask register in sky2 is buggy, because bits are
          "or'd" into an uninitialized local variable.  Fix from Lino
          Sanfilippo.
      
      21) Fix FCOE checksum offload handling, from Yi Zou.
      
      22) Fix VLAN processing regression in e1000, from Jiri Pirko.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
        sky2: dont overwrite settings for PHY Quick link
        tg3: Fix 5717 serdes powerdown problem
        net: usb: cdc_eem: fix mtu
        net: sh_eth: fix endian check for architecture independent
        usb/rtl8150 : Remove duplicated definitions
        rionet: fix page allocation order of rionet_active
        via-rhine: fix wait-bit inversion.
        ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
        net: lpc_eth: Fix rename of dev_hw_addr_random
        net/netfilter/nfnetlink_acct.c: use linux/atomic.h
        rose_dev: fix memcpy-bug in rose_set_mac_address
        Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.
        net/garp: avoid infinite loop if attribute already exists
        x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
        bonding: emit event when bonding changes MAC
        mac80211: fix oper channel timestamp updation
        ath9k: Use HW HT capabilites properly
        MAINTAINERS: adding maintainer for ipw2x00
        net: orinoco: add error handling for failed kmalloc().
        net/wireless: ipw2x00: fix a typo in wiphy struct initilization
        ...
      ed359a3b
  3. 02 Apr, 2012 1 commit