1. 08 Feb, 2013 7 commits
  2. 07 Feb, 2013 1 commit
    • Sjur Brændeland's avatar
      virtio_console: Don't access uninitialized data. · aded024a
      Sjur Brændeland authored
      Don't access uninitialized work-queue when removing device.
      The work queue is initialized only if the device multi-queue.
      So don't call cancel_work unless this is a multi-queue device.
      
      This fixes the following panic:
      
      Kernel panic - not syncing: BUG!
      Call Trace:
      62031b28:  [<6026085d>] panic+0x16b/0x2d3
      62031b30:  [<6004ef5e>] flush_work+0x0/0x1d7
      62031b60:  [<602606f2>] panic+0x0/0x2d3
      62031b68:  [<600333b0>] memcpy+0x0/0x140
      62031b80:  [<6002d58a>] unblock_signals+0x0/0x84
      62031ba0:  [<602609c5>] printk+0x0/0xa0
      62031bd8:  [<60264e51>] __mutex_unlock_slowpath+0x13d/0x148
      62031c10:  [<6004ef5e>] flush_work+0x0/0x1d7
      62031c18:  [<60050234>] try_to_grab_pending+0x0/0x17e
      62031c38:  [<6004e984>] get_work_gcwq+0x71/0x8f
      62031c48:  [<60050539>] __cancel_work_timer+0x5b/0x115
      62031c78:  [<628acc85>] unplug_port+0x0/0x191 [virtio_console]
      62031c98:  [<6005061c>] cancel_work_sync+0x12/0x14
      62031ca8:  [<628ace96>] virtcons_remove+0x80/0x15c [virtio_console]
      62031ce8:  [<628191de>] virtio_dev_remove+0x1e/0x7e [virtio]
      62031d08:  [<601cf242>] __device_release_driver+0x75/0xe4
      62031d28:  [<601cf2dd>] device_release_driver+0x2c/0x40
      62031d48:  [<601ce0dd>] driver_unbind+0x7d/0xc6
      62031d88:  [<601cd5d9>] drv_attr_store+0x27/0x29
      62031d98:  [<60115f61>] sysfs_write_file+0x100/0x14d
      62031df8:  [<600b737d>] vfs_write+0xcb/0x184
      62031e08:  [<600b58b8>] filp_close+0x88/0x94
      62031e38:  [<600b7686>] sys_write+0x59/0x88
      62031e88:  [<6001ced1>] handle_syscall+0x5d/0x80
      62031ea8:  [<60030a74>] userspace+0x405/0x531
      62031f08:  [<600d32cc>] sys_dup+0x0/0x5e
      62031f28:  [<601b11d6>] strcpy+0x0/0x18
      62031f38:  [<600be46c>] do_execve+0x10/0x12
      62031f48:  [<600184c7>] run_init_process+0x43/0x45
      62031fd8:  [<60019a91>] new_thread_handler+0xba/0xbc
      Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      aded024a
  3. 06 Feb, 2013 16 commits
  4. 05 Feb, 2013 16 commits
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 1589a3e7
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "For a regression fix on a few radio drivers that were preventing radio
        TX to work on those devices"
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] radio: set vfl_dir correctly to fix modulator regression
      1589a3e7
    • Linus Torvalds's avatar
      Merge tag 'usb-3.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 0f632118
      Linus Torvalds authored
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a few tiny USB fixes for 3.8-rc6.
      
        Nothing major here, some host controller bug fixes to resolve a number
        of bugs that people have reported, and a bunch of additional device
        ids are added to a number of drivers (which caused code to be deleted
        from the usb-storage driver, always nice)"
      
      * tag 'usb-3.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
        USB: storage: optimize to match the Huawei USB storage devices and support new switch command
        USB: storage: Define a new macro for USB storage match rules
        USB: ftdi_sio: add Zolix FTDI PID
        USB: option: add Changhong CH690
        USB: ftdi_sio: add PID/VID entries for ELV WS 300 PC II
        USB: add OWL CM-160 support to cp210x driver
        USB: EHCI: fix bug in scheduling periodic split transfers
        USB: EHCI: fix for leaking isochronous data
        USB: option: add support for Telit LE920
        USB: qcserial: add Telit Gobi QDL device
        USB: EHCI: fix timer bug affecting port resume
        USB: UHCI: notify usbcore about port resumes
        USB: EHCI: notify usbcore about port resumes
        USB: add usb_hcd_{start,end}_port_resume
        USB: EHCI: unlink one async QH at a time
        USB: EHCI: remove ASS/PSS polling timeout
        usb: Using correct way to clear usb3.0 device's remote wakeup feature.
        usb: Prevent dead ports when xhci is not enabled
        USB: XHCI: fix memory leak of URB-private data
        drivers: xhci: fix incorrect bit test
        ...
      0f632118
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-v3.8-rc7' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping · 85e28c76
      Linus Torvalds authored
      Pull DMA mapping fixes from Marek Szyprowski:
       "This pull request contains important bugfix patches for 9
        architectures, which finally fixes broken allmodconfig builds
        introduced in v3.8-rc1.  Those architectures don't use dma_map_ops
        based implementation and require manual update or additional dummy
        implementations of the missing new dma-mapping api functions:
        dma_mmap_coherent and dma_get_sgtable."
      
      * 'fixes-for-v3.8-rc7' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
        xtensa: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
        parisc: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
        mn10300: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
        m68k: Provide dma_mmap_coherent() and dma_get_sgtable()
        frv: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
        cris: Provide dma_mmap_coherent() and dma_get_sgtable()
        c6x: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
        blackfin: Provide dma_mmap_coherent() and dma_get_sgtable()
        avr32: Provide dma_mmap_coherent() and dma_get_sgtable()
      85e28c76
    • Josef Bacik's avatar
      Btrfs: fix possible stale data exposure · 59fe4f41
      Josef Bacik authored
      We specifically do not update the disk i_size if there are ordered extents
      outstanding for any area between the current disk_i_size and our ordered
      extent so that we do not expose stale data.  The problem is the check we
      have only checks if the ordered extent starts at or after the current
      disk_i_size, which doesn't take into account an ordered extent that starts
      before the current disk_i_size and ends past the disk_i_size.  Fix this by
      checking if the extent ends past the disk_i_size.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      59fe4f41
    • Josef Bacik's avatar
      Btrfs: fix missing i_size update · 5d1f4020
      Josef Bacik authored
      If we have an ordered extent before the ordered extent we are currently
      completing that is after the current disk_i_size we will put our i_size
      update into that ordered extent so that we do not expose stale data.  The
      problem is that if our disk i_size is updated past the previous ordered
      extent we won't update the i_size with the pending i_size update.  So check
      the pending i_size update and if its above the current disk i_size we need
      to go ahead and try to update.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      5d1f4020
    • Liu Bo's avatar
      Btrfs: fix race between snapshot deletion and getting inode · 6f1c3605
      Liu Bo authored
      While running snapshot testscript created by Mitch and David,
      the race between autodefrag and snapshot deletion can lead to
      corruption of dead_root list so that we can get crash on
      btrfs_clean_old_snapshots().
      
      And besides autodefrag, scrub also does the same thing, ie. read
      root first and get inode.
      
      Here is the story(take autodefrag as an example):
      (1) when we delete a snapshot or subvolume, it will set its root's
      refs to zero and do a iput() on its own inode, and if this inode happens
      to be the only active in-meory one in root's inode rbtree, it will add
      itself to the global dead_roots list for later cleanup.
      
      (2) after (1), the autodefrag thread may read another inode for defrag
      and the inode is just in the deleted snapshot/subvolume, but all of these
      are without checking if the root is still valid(refs > 0).  So the end up
      result is adding the deleted snapshot/subvolume's root to the global
      dead_roots list AGAIN.
      
      Fortunately, we already have a srcu lock to avoid the race, ie. subvol_srcu.
      
      So all we need to do is to take the lock to protect 'read root and get inode',
      since we synchronize to wait for the rcu grace period before adding something
      to the global dead_roots list.
      Reported-by: default avatarMitch Harder <mitch.harder@sabayonlinux.org>
      Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      6f1c3605
    • Miao Xie's avatar
      Btrfs: fix missing release of the space/qgroup reservation in start_transaction() · 843fcf35
      Miao Xie authored
      When we fail to start a transaction, we need to release the reserved free space
      and qgroup space, fix it.
      Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
      Reviewed-by: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      843fcf35
    • Miao Xie's avatar
      Btrfs: fix wrong sync_writers decrement in btrfs_file_aio_write() · 0a3404dc
      Miao Xie authored
      If the checks at the beginning of btrfs_file_aio_write() fail, we needn't
      decrease ->sync_writers, because we have not increased it. Fix it.
      Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      0a3404dc
    • Josef Bacik's avatar
      Btrfs: do not merge logged extents if we've removed them from the tree · 222c81dc
      Josef Bacik authored
      You can run into this problem where if somebody is fsyncing and writing out
      the existing extents you will have removed the extent map from the em tree,
      but it's still valid for the current fsync so we go ahead and write it.  The
      problem is we unconditionally try to merge it back into the em tree, but if
      we've removed it from the em tree that will cause use after free problems.
      Fix this to only merge if we are still a part of the tree.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      222c81dc
    • Roland Dreier's avatar
      cbdba97a
    • Mike Marciniszyn's avatar
      IB/qib: Fix for broken sparse warning fix · d359f354
      Mike Marciniszyn authored
      Commit 1fb9fed6 ("IB/qib: Fix QP RCU sparse warning") broke QP
      hash list deletion in qp_remove() badly.
      
      This patch restores the former for loop behavior, while still fixing
      the sparse warnings.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarGary Leshner <gary.s.leshner@intel.com>
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      d359f354
    • Or Gerlitz's avatar
      mlx4_core: Fix advertisement of wrong PF context behaviour · f97b4b5d
      Or Gerlitz authored
      Commit 08ff3235 ("mlx4: 64-byte CQE/EQE support") introduced a
      regression where older guest VF drivers failed to load even when
      64-byte EQEs/CQEs are disabled, since the PF wrongly advertises the
      new context behaviour anyway.  The failure looks like:
      
          mlx4_core 0000:00:07.0: Unknown pf context behaviour
          mlx4_core 0000:00:07.0: Failed to obtain slave caps
          mlx4_core: probe of 0000:00:07.0 failed with error -38
      
      Fix this by basing this advertisement on dev->caps.flags, which is the
      operational capabilities used by the QUERY_FUNC_CAP command wrapper
      (dev_cap->flags holds the firmware capabilities).
      Reported-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      f97b4b5d
    • Shlomo Pongratz's avatar
      IPoIB: Fix crash due to skb double destruct · 7e5a90c2
      Shlomo Pongratz authored
      After commit b13912bb ("IPoIB: Call skb_dst_drop() once skb is
      enqueued for sending"), using connected mode and running multithreaded
      iperf for long time, ie
      
          iperf -c <IP> -P 16 -t 3600
      
      results in a crash.
      
      After the above-mentioned patch, the driver is calling skb_orphan() and
      skb_dst_drop() after calling post_send() in ipoib_cm.c::ipoib_cm_send()
      (also in ipoib_ib.c::ipoib_send())
      
      The problem with this is, as is written in a comment in both routines,
      "it's entirely possible that the completion handler will run before we
      execute anything after the post_send()."  This leads to running the
      skb cleanup routines simultaneously in two different contexts.
      
      The solution is to always perform the skb_orphan() and skb_dst_drop()
      before queueing the send work request.  If an error occurs, then it
      will be no different than the regular case where dev_free_skb_any() in
      the completion path, which is assumed to be after these two routines.
      Signed-off-by: default avatarShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      7e5a90c2
    • Barry Song's avatar
      pinctrl: sirf: replace of_gpio_simple_xlate by sirf specific of_xlate · 228f1ce9
      Barry Song authored
      the default of_gpio_simple_xlate() will make us fail while getting gpios
      bigger than 32 by of_get_named_gpio() or related APIs.
      this patch adds a specific of_xlate callback for sirf gpio_chip and fix
      the problem.
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      228f1ce9
    • Kukjin Kim's avatar
      pinctrl: exynos: change PINCTRL_EXYNOS option · a1ed2670
      Kukjin Kim authored
      Since pinctrl-exynos can support exynos4 and exynos5 so changed
      the option name to PINCTRL_EXYNOS for more clarity.
      
      Cc: Thomas Abraham <Thomas.abraham@linaro.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      a1ed2670
    • Linus Torvalds's avatar
      Merge branch 'fix-max-write' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm · fe547d77
      Linus Torvalds authored
      Pull dlm fix from David Teigland:
       "Thanks to Jana who reported the problem and was able to test this fix
        so quickly."
      
      This fixes an incorrect size check that triggered for CONFIG_COMPAT
      whether the code was actually doing compat or not.  The incorrect write
      size check broke userland (clvmd) when maximum resource name lengths are
      used.
      
      * 'fix-max-write' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
        dlm: check the write size from user
      fe547d77