1. 31 Oct, 2012 4 commits
    • Al Viro's avatar
      Return the right error value when dup[23]() newfd argument is too large · 08f05c49
      Al Viro authored
      Jack Lin reports that the error return from dup3() for the RLIMIT_NOFILE
      case changed incorrectly after 3.6.
      
      The culprit is commit f33ff992 ("take rlimit check to callers of
      expand_files()") which when it moved the "return -EMFILE" out to the
      caller, didn't notice that the dup3() had special code to turn the
      EMFILE return into EBADF.
      
      The replace_fd() helper that got added later then inherited the bug too.
      Reported-by: default avatarJack Lin <linliangjie@huawei.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      [ Noted more bugs, wrote proper changelog, fixed up typos - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      08f05c49
    • Linus Torvalds's avatar
      Merge tag 'md-3.7-fixes' of git://neil.brown.name/md · 2df4f261
      Linus Torvalds authored
      Pull md fixes from NeilBrown:
       "Some fixes for md in 3.7
         - one recently introduced crash for dm-raid10 with discard
         - one bug in new functionality that has been around for a few
           releases.
         - minor bug in md's 'faulty' personality
      
        and UAPI disintegration for md."
      
      * tag 'md-3.7-fixes' of git://neil.brown.name/md:
        MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c
        md/raid1: Fix assembling of arrays containing Replacements.
        md faulty: use disk_stack_limits()
        UAPI: (Scripted) Disintegrate include/linux/raid
      2df4f261
    • Jonathan Brassow's avatar
      MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c · ed30be07
      Jonathan Brassow authored
      Commit 2863b9eb didn't take into account the changes to add TRIM support to
      RAID10 (commit 532a2a3f).  That is, when using dm-raid.c to create the
      RAID10 arrays, there is no mddev->gendisk or mddev->queue.  The code added
      to support TRIM simply assumes that mddev->queue is available without
      checking.  The result is an oops any time dm-raid.c attempts to create a
      RAID10 device.
      Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      ed30be07
    • NeilBrown's avatar
      md/raid1: Fix assembling of arrays containing Replacements. · 02b898f2
      NeilBrown authored
      setup_conf in raid1.c uses conf->raid_disks before assigning
      a value.  It is used when including 'Replacement' devices.
      
      The consequence is that assembling an array which contains a
      replacement will misbehave and either not include the replacement, or
      not include the device being replaced.
      
      Though this doesn't lead directly to data corruption, it could lead to
      reduced data safety.
      
      So use mddev->raid_disks, which is initialised, instead.
      
      Bug was introduced by commit c19d5798
            md/raid1: recognise replacements when assembling arrays.
      
      in 3.3, so fix is suitable for 3.3.y thru 3.6.y.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      02b898f2
  2. 30 Oct, 2012 17 commits
  3. 29 Oct, 2012 3 commits
  4. 28 Oct, 2012 11 commits
  5. 27 Oct, 2012 5 commits
    • Jon Hunter's avatar
      gpio/omap: fix off-mode bug: clear debounce settings on free/reset · c9c55d92
      Jon Hunter authored
      This change was originally titled "gpio/omap: fix off-mode bug: clear debounce
      clock enable mask on free/reset". The title has been updated slightly to
      reflect (what should be) the final fix.
      
      When a GPIO is freed or shutdown, we need to ensure that any debounce settings
      are cleared and if the GPIO is the only GPIO in the bank that is currently
      using debounce, then disable the debounce clock as well to save power.
      
      Currently, the debounce settings are not cleared on a GPIO free or shutdown and
      so during a context restore on subsequent off-mode transition, the previous
      debounce values are restored from the shadow copies (bank->context.debounce*)
      leading to mismatch state between driver state and hardware state.
      
      This was discovered when board code was doing
      
        gpio_request_one()
        gpio_set_debounce()
        gpio_free()
      
      which was leaving the GPIO debounce settings in a confused state.  If that GPIO
      bank is subsequently used with off-mode enabled, bogus state would be restored,
      leaving GPIO debounce enabled which then prevented the CORE powerdomain from
      transitioning.
      
      To fix this, introduce a new function called _clear_gpio_debounce() to clear
      any debounce settings when the GPIO is freed or shutdown. If this GPIO is the
      last debounce-enabled GPIO in the bank, the debounce will also be cut.
      
      Please note that we cannot use _gpio_dbck_disable() to disable the debounce
      clock because this has been specifically created for the gpio suspend path
      and is intended to shutdown the debounce clock while debounce is enabled.
      
      Special thanks to Kevin Hilman for root causing the bug. This fix is a
      collaborative effort with inputs from Kevin Hilman, Grazvydas Ignotas and
      Santosh Shilimkar.
      
      Testing:
      - This has been unit tested on an OMAP3430 Beagle board, by requesting a gpio,
        enabling debounce and then freeing the gpio and checking the register
        contents, the saved register context and the debounce clock state.
      - Kevin Hilman tested on 37xx/EVM board which configures GPIO debounce for the
        ads7846 touchscreen in its board file using the above sequence, and so was
        failing off-mode tests in dynamic idle. Verified that off-mode tests are
        passing with this patch.
      
      V5 changes:
      - Corrected author
      Reported-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Grazvydas Ignotas <notasas@gmail.com>
      Cc: Jon Hunter <jon-hunter@ti.com>
      Signed-off-by: default avatarJon Hunter <jon-hunter@ti.com>
      Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
      Tested-by: default avatarKevin Hilman <khilman@ti.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      c9c55d92
    • Arnd Bergmann's avatar
      Revert "ARM i.MX25: Fix PWM per clock lookups" · 943bb487
      Arnd Bergmann authored
      This reverts commit 92063cee, it
      was applied prematurely, causing this build error for
      imx_v4_v5_defconfig:
      
      arch/arm/mach-imx/clk-imx25.c: In function 'mx25_clocks_init':
      arch/arm/mach-imx/clk-imx25.c:206:26: error: 'pwm_ipg_per' undeclared (first use in this function)
      arch/arm/mach-imx/clk-imx25.c:206:26: note: each undeclared identifier is reported only once for each function it appears in
      
      Sascha Hauer explains:
      > There are several gates missing in clk-imx25.c. I have a patch which
      > adds support for them and I seem to have missed that the above depends
      > on it.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      943bb487
    • Arnd Bergmann's avatar
      ARM: versatile: fix versatile_defconfig · 5b627ba0
      Arnd Bergmann authored
      With the introduction of CONFIG_ARCH_MULTIPLATFORM, versatile is
      no longer the default platform, so we need to enable
      CONFIG_ARCH_VERSATILE explicitly in order for that to be selected
      rather than the multiplatform configuration.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      5b627ba0
    • Thomas Petazzoni's avatar
      ARM: mvebu: update defconfig with 3.7 changes · e09348c7
      Thomas Petazzoni authored
      The split of 370 and XP into two Kconfig options and the multiplatform
      kernel support has changed a few Kconfig symbols, so let's update the
      mvebu_defconfig file with the latest changes.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      e09348c7
    • Arnd Bergmann's avatar
      ARM: at91: fix at91x40 build · 0654f4ab
      Arnd Bergmann authored
      patch 738a0fd7 "ARM: at91: fix external interrupts in non-DT case"
      fixed a run-time error on some at91 platforms but did not apply
      the same change to at91x40, which now doesn't build.
      
      This changes at91x40 in the same way that the other platforms
      were changed.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      0654f4ab