1. 16 Apr, 2012 1 commit
    • Linus Torvalds's avatar
      x86-32: fix up strncpy_from_user() sign error · 12e993b8
      Linus Torvalds authored
      The 'max' range needs to be unsigned, since the size of the user address
      space is bigger than 2GB.
      
      We know that 'count' is positive in 'long' (that is checked in the
      caller), so we will truncate 'max' down to something that fits in a
      signed long, but before we actually do that, that comparison needs to be
      done in unsigned.
      
      Bug introduced in commit 92ae03f2 ("x86: merge 32/64-bit versions of
      'strncpy_from_user()' and speed it up").  On x86-64 you can't trigger
      this, since the user address space is much smaller than 63 bits, and on
      x86-32 it works in practice, since you would seldom hit the strncpy
      limits anyway.
      
      I had actually tested the corner-cases, I had only tested them on
      x86-64.  Besides, I had only worried about the case of a pointer *close*
      to the end of the address space, rather than really far away from it ;)
      
      This also changes the "we hit the user-specified maximum" to return
      'res', for the trivial reason that gcc seems to generate better code
      that way.  'res' and 'count' are the same in that case, so it really
      doesn't matter which one we return.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      12e993b8
  2. 15 Apr, 2012 8 commits
    • Rafael J. Wysocki's avatar
      PCI: Fix regression in pci_restore_state(), v3 · ebfc5b80
      Rafael J. Wysocki authored
      Commit 26f41062 ("PCI: check for pci bar restore completion and
      retry") attempted to address problems with PCI BAR restoration on
      systems where FLR had not been completed before pci_restore_state() was
      called, but it did that in an utterly wrong way.
      
      First off, instead of retrying the writes for the BAR registers only, it
      did that for all of the PCI config space of the device, including the
      status register (whose value after the write quite obviously need not be
      the same as the written one).  Second, it added arbitrary delay to
      pci_restore_state() even for systems where the PCI config space
      restoration was successful at first attempt.  Finally, the mdelay(10) it
      added to every iteration of the writing loop was way too much of a delay
      for any reasonable device.
      
      All of this actually caused resume failures for some devices on Mikko's
      system.
      
      To fix the regression, make pci_restore_state() only retry the writes
      for BAR registers and only wait if the first read from the register
      doesn't return the written value.  Additionaly, make it wait for 1 ms,
      instead of 10 ms, after every failing attempt to write into config
      space.
      Reported-by: default avatarMikko Vinni <mmvinni@yahoo.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ebfc5b80
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 6c23b8e9
      Linus Torvalds authored
      Pull "ARM: a few more SoC fixes for 3.4-rc" from Olof Johansson:
       - A handful of warning and build fixes for Qualcomm MSM
       - Build/warning and bug fixes for Samsung Exynos
       - A fix from Rob Herring that removes misplaced interrupt-parent
         properties from a few device trees
       - A fix to OMAP dealing with cpufreq build errors, removing some of the
         offending code since it was redundant anyway
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors
        ARM: dts: remove blank interrupt-parent properties
        ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files
        ARM: EXYNOS: Remove broken config values for touchscren for NURI board
        ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards
        ARM: EXYNOS: fix regulator name for NURI board
        ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
        ARM: msm: Fix section mismatches in proc_comm.c
        video: msm: Fix section mismatches in mddi.c
        arm: msm: trout: fix compile failure
        arm: msm: halibut: remove unneeded fixup
        ARM: EXYNOS: Add PDMA and MDMA physical base address defines
        ARM: S5PV210: Fix compiler warning in dma.c file
        ARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c
        ARM: EXYNOS: Add missing definition for IRQ_I2S0
        ARM: S5PV210: fix unused LDO supply field from wm8994_pdata
      6c23b8e9
    • Linus Torvalds's avatar
      Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 218a8c2b
      Linus Torvalds authored
      Pull another round of sound fixes from Takashi Iwai:
       "A few regression fixes for Realtek HD-audio codecs, mainly specific to
        some laptop models."
      
      * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).
        ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines
        ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G
        ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co
        ALSA: hda/realtek - Add a few ALC882 model strings back
      218a8c2b
    • Martin K. Petersen's avatar
      SCSI: Fix error handling when no ULD is attached · 919f797a
      Martin K. Petersen authored
      Commit 18a4d0a2 ("[SCSI] Handle disk devices which can not process
      medium access commands") introduced a bug in which we would attempt to
      dereference the scsi driver even when the device had no ULD attached.
      
      Ensure that a driver is registered and make the driver accessor function
      more resilient to errors during device discovery.
      Reported-by: default avatarElric Fu <elricfu1@gmail.com>
      Reported-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      919f797a
    • Olof Johansson's avatar
      Merge branch 'v3.4-samsung-fixes-2' of... · 961a238c
      Olof Johansson authored
      Merge branch 'v3.4-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
      
      * 'v3.4-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files
        ARM: EXYNOS: Remove broken config values for touchscren for NURI board
        ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards
        ARM: EXYNOS: fix regulator name for NURI board
        ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
        ARM: EXYNOS: Add PDMA and MDMA physical base address defines
        ARM: S5PV210: Fix compiler warning in dma.c file
        ARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c
        ARM: EXYNOS: Add missing definition for IRQ_I2S0
        ARM: S5PV210: fix unused LDO supply field from wm8994_pdata
      961a238c
    • Kevin Hilman's avatar
      ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors · 47d9e44d
      Kevin Hilman authored
      Now that we have OPP layer, and OMAP CPUfreq driver is using it, we no
      longer need/use the clock framework code for filling up CPUfreq
      tables.  Remove it.
      
      Removing this code also eliminates build errors when CPU_FREQ_TABLE
      support is not enabled.
      
      Thanks to Russell King for pointing out the parts I missed under
      plat-omap in the original version and also pointing out the build
      errors when CPUFREQ_TABLE support was not enabled.
      
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      47d9e44d
    • Rob Herring's avatar
      ARM: dts: remove blank interrupt-parent properties · eb03f280
      Rob Herring authored
      These were incorrectly introduced and can cause problems for of_irq_init.
      
      The correct way to define a root controller is no interrupt-parent set at
      all or the interrupt-parent is set to the root controller itself when
      inherited from a parent node.
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      Tested-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      eb03f280
    • Olof Johansson's avatar
      Merge branch 'msm-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into fixes · 9e7bcbe8
      Olof Johansson authored
      From David Brown:
        "Here are some fixes for msm that fix problems caused by the latest
         ARM code.  The ones from Daniel remove unneeded fixups that now
         cause compilation failures.  Mine fix section mismatches, that were
         incompletely fixed earlier."
      
      * 'msm-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
        ARM: msm: Fix section mismatches in proc_comm.c
        video: msm: Fix section mismatches in mddi.c
        arm: msm: trout: fix compile failure
        arm: msm: halibut: remove unneeded fixup
      9e7bcbe8
  3. 14 Apr, 2012 13 commits
  4. 13 Apr, 2012 18 commits