Skip to content
  1. Nov 01, 2012
  2. Oct 31, 2012
    • 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
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-v3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · bc909421
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       - Fix a potential bit wrap issue in the Timberdale driver
       - Fix up the buffer allocation size in the 74x164 driver
       - Set the value in direction_output() right in the mvebu driver
       - Return proper error codes for invalid GPIOs
       - Fix an off-mode bug for the OMAP
       - Don't initialize the mask_cach on the mvebu driver
      
      * tag 'gpio-fixes-v3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        GPIO: mvebu-gpio: Don't initialize the mask_cache
        gpio/omap: fix off-mode bug: clear debounce settings on free/reset
        gpiolib: Don't return -EPROBE_DEFER to sysfs, or for invalid gpios
        gpio: mvebu: correctly set the value in direction_output()
        gpio-74x164: Fix buffer allocation size
        gpio-timberdale: fix a potential wrapping issue
      bc909421
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 8c673cbc
      Linus Torvalds authored
      Pull ext4 bugfix from Ted Ts'o:
       "This fixes the root cause of the ext4 data corruption bug which raised
        a ruckus on LWN, Phoronix, and Slashdot.
      
        This bug only showed up when non-standard mount options
        (journal_async_commit and/or journal_checksum) were enabled, and when
        the file system was not cleanly unmounted, but the root cause was the
        inode bitmap modifications was not being properly journaled.
      
        This could potentially lead to minor file system corruptions (pass 5
        complaints with the inode allocation bitmap) after an unclean shutdown
        under the wrong/unlucky workloads, but it turned into major failure if
        the journal_checksum and/or jouaral_async_commit was enabled."
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix unjournaled inode bitmap modification
      8c673cbc
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 4476c0ee
      Linus Torvalds authored
      Pull block driver update from Jens Axboe:
       "Distilled down variant, the rest will pass over to 3.8.  I pulled it
        into the for-linus branch I had waiting for a pull request as well, in
        case you are wondering why there are new entries in here too.  This
        also got rid of two reverts and the ones of the mtip32xx patches that
        went in later in the 3.6 cycle, so the series looks a bit cleaner."
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        loop: Make explicit loop device destruction lazy
        mtip32xx:Added appropriate timeout value for secure erase
        xen/blkback: Change xen_vbd's flush_support and discard_secure to have type unsigned int, rather than bool
        cciss: select CONFIG_CHECK_SIGNATURE
        cciss: remove unneeded memset()
        xen/blkback: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
        pktcdvd: update MAINTAINERS
        floppy: remove dr, reuse drive on do_floppy_init
        floppy: use common function to check if floppies can be registered
        floppy: properly handle failure on add_disk loop
        floppy: do put_disk on current dr if blk_init_queue fails
        floppy: don't call alloc_ordered_workqueue inside the alloc_disk loop
        xen/blkback: Fix compile warning
        block: Add blk_rq_pos(rq) to sort rq when plushing
        drivers/block: remove CONFIG_EXPERIMENTAL
        block: remove CONFIG_EXPERIMENTAL
        vfs: fix: don't increase bio_slab_max if krealloc() fails
        blkcg: stop iteration early if root_rl is the only request list
        blkcg: Fix use-after-free of q->root_blkg and q->root_rl.blkg
      4476c0ee
    • Andrew Lunn's avatar
      GPIO: mvebu-gpio: Don't initialize the mask_cache · 8fcff5f1
      Andrew Lunn authored
      
      
      Due to the SMP nature of some of the chips, which have per CPU
      registers, the driver does not use the generic irq_gc_mask_set_bit() &
      irq_gc_mask_clr_bit() functions, which only support a single register.
      The driver has its own implementation of these functions, which can
      pick the correct register depending on the CPU being used. The
      functions do however use the gc->mask_cache value.
      
      The call to irq_setup_generic_chip() was passing
      IRQ_GC_INIT_MASK_CACHE, which caused the gc->mask_cache to be
      initialized to the contents of some random register. This resulted in
      unexpected interrupts been delivered from random GPIO lines.
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Tested-by: default avatarJamie Lentin <jm@lentin.co.uk>
      Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Tested-by: default avatarMichael Walle <michael@walle.cc>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      8fcff5f1
  3. Oct 30, 2012
  4. Oct 29, 2012
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 35fd3dc5
      Linus Torvalds authored
      Pull Ceph fixes form Sage Weil:
       "There are two fixes in the messenger code, one that can trigger a NULL
        dereference, and one that error in refcounting (extra put).  There is
        also a trivial fix that in the fs client code that is triggered by NFS
        reexport."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        ceph: fix dentry reference leak in encode_fh()
        libceph: avoid NULL kref_put when osd reset races with alloc_msg
        rbd: reset BACKOFF if unable to re-queue
      35fd3dc5
    • David Zafman's avatar
      ceph: fix dentry reference leak in encode_fh() · 52eb5a90
      David Zafman authored
      
      
      Call to d_find_alias() needs a corresponding dput()
      
      This fixes http://tracker.newdream.net/issues/3271
      
      Signed-off-by: default avatarDavid Zafman <david.zafman@inktank.com>
      Reviewed-by: default avatarSage Weil <sage@inktank.com>
      52eb5a90
    • Eric Sandeen's avatar
      ext4: fix unjournaled inode bitmap modification · ffb5387e
      Eric Sandeen authored
      commit 119c0d44
      
       changed
      ext4_new_inode() such that the inode bitmap was being modified
      outside a transaction, which could lead to corruption, and was
      discovered when journal_checksum found a bad checksum in the
      journal during log replay.
      
      Nix ran into this when using the journal_async_commit mount
      option, which enables journal checksumming.  The ensuing
      journal replay failures due to the bad checksums led to
      filesystem corruption reported as the now infamous
      "Apparent serious progressive ext4 data corruption bug"
      
      [ Changed by tytso to only call ext4_journal_get_write_access() only
        when we're fairly certain that we're going to allocate the inode. ]
      
      I've tested this by mounting with journal_checksum and
      running fsstress then dropping power; I've also tested by
      hacking DM to create snapshots w/o first quiescing, which
      allows me to test journal replay repeatedly w/o actually
      power-cycling the box.  Without the patch I hit a journal
      checksum error every time.  With this fix it survives
      many iterations.
      
      Reported-by: default avatarNix <nix@esperi.org.uk>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      ffb5387e
    • Linus Torvalds's avatar
      Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 6b0cb4ee
      Linus Torvalds authored
      Pull i2c subsystem fixes from Jean Delvare.
      
      * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        i2c-i801: Fix comment
        i2c-i801: Simplify dependency towards GPIOLIB
        i2c-stub: Move to drivers/i2c
      6b0cb4ee
    • Jean Delvare's avatar
      i2c-i801: Fix comment · 28901f57
      Jean Delvare authored
      
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      28901f57
    • Jean Delvare's avatar
      i2c-i801: Simplify dependency towards GPIOLIB · 79e3e5b8
      Jean Delvare authored
      
      
      Arbitrarily selecting GPIOLIB causes trouble on some architectures,
      so don't do that. Instead, just make the optional multiplexing code
      depend on CONFIG_I2C_MUX_GPIO instead of CONFIG_I2C_MUX for now. We
      can revisit if the i2c-i801 driver ever supports other multiplexing
      flavors.
      
      Also make that optional code depend on DMI, as it won't do anything
      without that.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      79e3e5b8
    • Jean Delvare's avatar
      i2c-stub: Move to drivers/i2c · 31d178bf
      Jean Delvare authored
      
      
      Move the i2c-stub driver to drivers/i2c, to match the Kconfig entry.
      This is less confusing that way.
      
      I also fixed all checkpatch warnings and errors.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Peter Huewe <peterhuewe@gmx.de>
      31d178bf
    • Linus Torvalds's avatar
      Linux 3.7-rc3 · 8f0d8163
      Linus Torvalds authored
      v3.7-rc3
      8f0d8163
    • Linus Torvalds's avatar
      Merge tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · 5a5210c6
      Linus Torvalds authored
      Pull ktest confusion fix from Steven Rostedt:
       "With the v3.7-rc2 kernel, the network cards on my target boxes were
        not being brought up.
      
        I found that the modules for the network was not being installed.
        This was due to the config CONFIG_MODULES_USE_ELF_RELA that came
        before CONFIG_MODULES, and confused ktest in thinking that
        CONFIG_MODULES=y was not found.
      
        Ktest needs to test all configs and not just stop if something starts
        with CONFIG_MODULES."
      
      * tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
        ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA
      5a5210c6
    • Linus Torvalds's avatar
      Merge tag 'spi-mxs' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc · 8e99165a
      Linus Torvalds authored
      Pull minor spi MXS fixes from Mark Brown:
       "These fixes are both pretty minor ones and are driver local."
      
      * tag 'spi-mxs' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
        spi: mxs: Terminate DMA in case of DMA timeout
        spi: mxs: Assign message status after transfer finished
      8e99165a
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 065c8012
      Linus Torvalds authored
      Pull arm-soc fixes from Arnd Bergmann:
       "Bug fixes for a number of ARM platforms, mostly OMAP, imx and at91.
      
        These come a little later than I had hoped but unfortunately we had a
        few of these patches cause regressions themselves and had to work out
        how to deal with those in the meantime."
      
      * tag 'fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
        Revert "ARM i.MX25: Fix PWM per clock lookups"
        ARM: versatile: fix versatile_defconfig
        ARM: mvebu: update defconfig with 3.7 changes
        ARM: at91: fix at91x40 build
        ARM: socfpga: Fix socfpga compilation with early_printk() enabled
        ARM: SPEAr: Remove unused empty files
        MAINTAINERS: Add arm-soc tree entry
        ARM: dts: mxs: add the "clock-names" for gpmi-nand
        ARM: ux500: Correct SDI5 address and add some format changes
        ARM: ux500: Specify AMBA Primecell IDs for Nomadik I2C in DT
        ARM: ux500: Fix build error relating to IRQCHIP_SKIP_SET_WAKE
        ARM: at91: drop duplicated config SOC_AT91SAM9 entry
        ARM: at91/i2c: change id to let i2c-at91 work
        ARM: at91/i2c: change id to let i2c-gpio work
        ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.
        ARM: at91: fix external interrupt specification in board code
        ARM: at91: fix external interrupts in non-DT case
        ARM: at91: at91sam9g10: fix SOC type detection
        ARM: at91/tc: fix typo in the DT document
        ARM: AM33XX: Fix configuration of dmtimer parent clock by dmtimer driverDate:Wed, 17 Oct 2012 13:55:55 -0500
        ...
      065c8012