1. 09 11月, 2012 1 次提交
    • C
      virtio: Don't access index after unregister. · 237242bd
      Cornelia Huck 提交于
      Virtio wants to release used indices after the corresponding
      virtio device has been unregistered. However, virtio does not
      hold an extra reference, giving up its last reference with
      device_unregister(), making accessing dev->index afterwards
      invalid.
      
      I actually saw problems when testing my (not-yet-merged)
      virtio-ccw code:
      
      - device_add virtio-net,id=xxx
      -> creates device virtio<n> with n>0
      
      - device_del xxx
      -> deletes virtio<n>, but calls ida_simple_remove with an
         index of 0
      
      - device_add virtio-net,id=xxx
      -> tries to add virtio0, which is still in use...
      
      So let's save the index we want to release before calling
      device_unregister().
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Acked-by: NSjur Brændeland <sjur.brandeland@stericsson.com>
      Cc: stable@kernel.org
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      237242bd
  2. 06 11月, 2012 1 次提交
  3. 31 10月, 2012 5 次提交
    • R
      module: fix out-by-one error in kallsyms · 59ef28b1
      Rusty Russell 提交于
      Masaki found and patched a kallsyms issue: the last symbol in a
      module's symtab wasn't transferred.  This is because we manually copy
      the zero'th entry (which is always empty) then copy the rest in a loop
      starting at 1, though from src[0].  His fix was minimal, I prefer to
      rewrite the loops in more standard form.
      
      There are two loops: one to get the size, and one to copy.  Make these
      identical: always count entry 0 and any defined symbol in an allocated
      non-init section.
      
      This bug exists since the following commit was introduced.
         module: reduce symbol table for loaded modules (v2)
         commit: 4a496226
      
      LKML: http://lkml.org/lkml/2012/10/24/27Reported-by: NMasaki Kimura <masaki.kimura.kz@hitachi.com>
      Cc: stable@kernel.org
      59ef28b1
    • L
      Merge tag 'gpio-fixes-v3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · bc909421
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 8c673cbc
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 4476c0ee
      Linus Torvalds 提交于
      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
    • A
      GPIO: mvebu-gpio: Don't initialize the mask_cache · 8fcff5f1
      Andrew Lunn 提交于
      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: NAndrew Lunn <andrew@lunn.ch>
      Tested-by: NJamie Lentin <jm@lentin.co.uk>
      Acked-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Tested-by: NMichael Walle <michael@walle.cc>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      8fcff5f1
  4. 30 10月, 2012 13 次提交
  5. 29 10月, 2012 14 次提交
  6. 28 10月, 2012 1 次提交
    • J
      gpio/omap: fix off-mode bug: clear debounce settings on free/reset · c9c55d92
      Jon Hunter 提交于
      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: NPaul 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: NJon Hunter <jon-hunter@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c9c55d92
  7. 27 10月, 2012 5 次提交
    • A
      Revert "ARM i.MX25: Fix PWM per clock lookups" · 943bb487
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      943bb487
    • A
      ARM: versatile: fix versatile_defconfig · 5b627ba0
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      5b627ba0
    • T
      ARM: mvebu: update defconfig with 3.7 changes · e09348c7
      Thomas Petazzoni 提交于
      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: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      e09348c7
    • A
      ARM: at91: fix at91x40 build · 0654f4ab
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      0654f4ab
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e657e078
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "This is what we usually expect at this stage of the game, lots of
        little things, mostly in drivers.  With the occasional 'oops didn't
        mean to do that' kind of regressions in the core code."
      
       1) Uninitialized data in __ip_vs_get_timeouts(), from Arnd Bergmann
      
       2) Reject invalid ACK sequences in Fast Open sockets, from Jerry Chu.
      
       3) Lost error code on return from _rtl_usb_receive(), from Christian
          Lamparter.
      
       4) Fix reset resume on USB rt2x00, from Stanislaw Gruszka.
      
       5) Release resources on error in pch_gbe driver, from Veaceslav Falico.
      
       6) Default hop limit not set correctly in ip6_template_metrics[], fix
          from Li RongQing.
      
       7) Gianfar PTP code requests wrong kind of resource during probe, fix
          from Wei Yang.
      
       8) Fix VHOST net driver on big-endian, from Michael S Tsirkin.
      
       9) Mallenox driver bug fixes from Jack Morgenstein, Or Gerlitz, Moni
          Shoua, Dotan Barak, and Uri Habusha.
      
      10) usbnet leaks memory on TX path, fix from Hemant Kumar.
      
      11) Use socket state test, rather than presence of FIN bit packet, to
          determine FIONREAD/SIOCINQ value.  Fix from Eric Dumazet.
      
      12) Fix cxgb4 build failure, from Vipul Pandya.
      
      13) Provide a SYN_DATA_ACKED state to complement SYN_FASTOPEN in socket
          info dumps.  From Yuchung Cheng.
      
      14) Fix leak of security path in kfree_skb_partial().  Fix from Eric
          Dumazet.
      
      15) Handle RX FIFO overflows more resiliently in pch_gbe driver, from
          Veaceslav Falico.
      
      16) Fix MAINTAINERS file pattern for networking drivers, from Jean
          Delvare.
      
      17) Add iPhone5 IDs to IPHETH driver, from Jay Purohit.
      
      18) VLAN device type change restriction is too strict, and should not
          trigger for the automatically generated vlan0 device.  Fix from Jiri
          Pirko.
      
      19) Make PMTU/redirect flushing work properly again in ipv4, from
          Steffen Klassert.
      
      20) Fix memory corruptions by using kfree_rcu() in netlink_release().
          From Eric Dumazet.
      
      21) More qmi_wwan device IDs, from Bjørn Mork.
      
      22) Fix unintentional change of SNAT/DNAT hooks in generic NAT
          infrastructure, from Elison Niven.
      
      23) Fix 3.6.x regression in xt_TEE netfilter module, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits)
        tilegx: fix some issues in the SW TSO support
        qmi_wwan/cdc_ether: move Novatel 551 and E362 to qmi_wwan
        net: usb: Fix memory leak on Tx data path
        net/mlx4_core: Unmap UAR also in the case of error flow
        net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
        net/mlx4_en: Fix double-release-range in tx-rings
        bas_gigaset: fix pre_reset handling
        vhost: fix mergeable bufs on BE hosts
        gianfar_ptp: use iomem, not ioports resource tree in probe
        ipv6: Set default hoplimit as zero.
        NET_VENDOR_TI: make available for am33xx as well
        pch_gbe: fix error handling in pch_gbe_up()
        b43: Fix oops on unload when firmware not found
        mwifiex: clean up scan state on error
        mwifiex: return -EBUSY if specific scan request cannot be honored
        brcmfmac: fix potential NULL dereference
        Revert "ath9k_hw: Updated AR9003 tx gain table for 5GHz"
        ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation
        rt2x00: usb: fix reset resume
        rtlwifi: pass rx setup error code to caller
        ...
      e657e078