1. 13 6月, 2013 14 次提交
  2. 12 6月, 2013 16 次提交
  3. 11 6月, 2013 7 次提交
    • M
      vhost: fix ubuf_info cleanup · 288cfe78
      Michael S. Tsirkin 提交于
      vhost_net_clear_ubuf_info didn't clear ubuf_info
      after kfree, this could trigger double free.
      Fix this and simplify this code to make it more robust: make sure
      ubuf info is always freed through vhost_net_clear_ubuf_info.
      Reported-by: NTommi Rantala <tt.rantala@gmail.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      288cfe78
    • M
      vhost: check owner before we overwrite ubuf_info · 05c05351
      Michael S. Tsirkin 提交于
      If device has an owner, we shouldn't touch ubuf_info
      since it might be in use.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05c05351
    • B
      qmi_wwan/cdc_ether: let qmi_wwan handle the Huawei E1820 · c2020be3
      Bjørn Mork 提交于
      Another QMI speaking Qualcomm based device, which should be
      driven by qmi_wwan, while cdc_ether should ignore it.
      
      Like on other Huawei devices, the wwan function can appear
      either as a single vendor specific interface or as a CDC ECM
      class function using separate control and data interfaces.
      The ECM control interface protocol is 0xff, likely in an
      attempt to indicate that vendor specific management is
      required.
      
      In addition to the near standard CDC class, Huawei also add
      vendor specific AT management commands to their firmwares.
      This is probably an attempt to support non-Windows systems
      using standard class drivers.  Unfortunately, this part of
      the firmware is often buggy.  Linux is much better off using
      whatever native vendor specific management protocol the
      device offers, and Windows uses, whenever possible. This
      means QMI in the case of Qualcomm based devices.
      
      The E1820 has been verified to work fine with QMI.
      
      Matching on interface number is necessary to distiguish the
      wwan function from serial functions in the single interface
      mode, as both function types will have class/subclass/function
      set to ff/ff/ff.
      
      The control interface number does not change in CDC ECM mode,
      so the interface number matching rule is sufficient to handle
      both modes.  The cdc_ether blacklist entry is only relevant in
      CDC ECM mode, but using a similar interface number based rule
      helps document this as a transfer from one driver to another.
      
      Other Huawei 02/06/ff devices are left with the cdc_ether driver
      because we do not know whether they are based on Qualcomm chips.
      The Huawei specific AT command management is known to be somewhat
      hardware independent, and their usage of these class codes may
      also be independent of the modem hardware.
      Reported-by: NGraham Inggs <graham.inggs@uct.ac.za>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2020be3
    • S
      sh_eth: fix result of sh_eth_check_reset() on timeout · 9f8c4265
      Sergei Shtylyov 提交于
      When  the first loop in sh_eth_check_reset() runs to its end, 'cnt' is 0, so the
      following check for 'cnt < 0' fails to catch the timeout.  Fix the  condition in
      this check, so that the timeout  is actually reported.
      While at it, fix the grammar in the failure message...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f8c4265
    • S
      net/ti davinci_mdio: don't hold a spin lock while calling pm_runtime · 2786aae7
      Sebastian Siewior 提交于
      was playing with suspend and run into this:
      
      |BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:891
      |in_atomic(): 1, irqs_disabled(): 0, pid: 1963, name: bash
      |6 locks held by bash/1963:
      |CPU: 0 PID: 1963 Comm: bash Not tainted 3.10.0-rc4+ #50
      |[<c0014fdc>] (unwind_backtrace+0x0/0xf8) from [<c0011da4>] (show_stack+0x10/0x14)
      |[<c0011da4>] (show_stack+0x10/0x14) from [<c02e8680>] (__pm_runtime_idle+0xa4/0xac)
      |[<c02e8680>] (__pm_runtime_idle+0xa4/0xac) from [<c0341158>] (davinci_mdio_suspend+0x6c/0x9c)
      |[<c0341158>] (davinci_mdio_suspend+0x6c/0x9c) from [<c02e0628>] (platform_pm_suspend+0x2c/0x54)
      |[<c02e0628>] (platform_pm_suspend+0x2c/0x54) from [<c02e52bc>] (dpm_run_callback.isra.3+0x2c/0x64)
      |[<c02e52bc>] (dpm_run_callback.isra.3+0x2c/0x64) from [<c02e57e4>] (__device_suspend+0x100/0x22c)
      |[<c02e57e4>] (__device_suspend+0x100/0x22c) from [<c02e67e8>] (dpm_suspend+0x68/0x230)
      |[<c02e67e8>] (dpm_suspend+0x68/0x230) from [<c0072a20>] (suspend_devices_and_enter+0x68/0x350)
      |[<c0072a20>] (suspend_devices_and_enter+0x68/0x350) from [<c0072f18>] (pm_suspend+0x210/0x24c)
      |[<c0072f18>] (pm_suspend+0x210/0x24c) from [<c0071c74>] (state_store+0x6c/0xbc)
      |[<c0071c74>] (state_store+0x6c/0xbc) from [<c02714dc>] (kobj_attr_store+0x14/0x20)
      |[<c02714dc>] (kobj_attr_store+0x14/0x20) from [<c01341a0>] (sysfs_write_file+0x16c/0x19c)
      |[<c01341a0>] (sysfs_write_file+0x16c/0x19c) from [<c00ddfe4>] (vfs_write+0xb4/0x190)
      |[<c00ddfe4>] (vfs_write+0xb4/0x190) from [<c00de3a4>] (SyS_write+0x3c/0x70)
      |[<c00de3a4>] (SyS_write+0x3c/0x70) from [<c000e2c0>] (ret_fast_syscall+0x0/0x48)
      
      I don't see a reason why the pm_runtime call must be under the lock.
      Further I don't understand why this is a spinlock and not mutex.
      
      Cc: Mugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2786aae7
    • J
      tuntap: fix a possible race between queue selection and changing queues · 92bb73ea
      Jason Wang 提交于
      Complier may generate codes that re-read the tun->numqueues during
      tun_select_queue(). This may be a race if vlan->numqueues were changed in the
      same time and can lead unexpected result (e.g. very huge value).
      
      We need prevent the compiler from generating such codes by adding an
      ACCESS_ONCE() to make sure tun->numqueues were only read once.
      
      Bug were introduced by commit c8d68e6b
      (tuntap: multiqueue support).
      Reported-by: NMichael S. Tsirkin <mst@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92bb73ea
    • J
      vhost_net: clear msg.control for non-zerocopy case during tx · 4364d5f9
      Jason Wang 提交于
      When we decide not use zero-copy, msg.control should be set to NULL otherwise
      macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs
      wrongly.
      
      Bug were introduced by commit cedb9bdc
      (vhost-net: skip head management if no outstanding).
      
      This solves the following warnings:
      
      WARNING: at include/linux/kref.h:47 handle_tx+0x477/0x4b0 [vhost_net]()
      Modules linked in: vhost_net macvtap macvlan tun nfsd exportfs bridge stp llc openvswitch kvm_amd kvm bnx2 megaraid_sas [last unloaded: tun]
      CPU: 5 PID: 8670 Comm: vhost-8668 Not tainted 3.10.0-rc2+ #1566
      Hardware name: Dell Inc. PowerEdge R715/00XHKG, BIOS 1.5.2 04/19/2011
      ffffffffa0198323 ffff88007c9ebd08 ffffffff81796b73 ffff88007c9ebd48
      ffffffff8103d66b 000000007b773e20 ffff8800779f0000 ffff8800779f43f0
      ffff8800779f8418 000000000000015c 0000000000000062 ffff88007c9ebd58
      Call Trace:
      [<ffffffff81796b73>] dump_stack+0x19/0x1e
      [<ffffffff8103d66b>] warn_slowpath_common+0x6b/0xa0
      [<ffffffff8103d6b5>] warn_slowpath_null+0x15/0x20
      [<ffffffffa0197627>] handle_tx+0x477/0x4b0 [vhost_net]
      [<ffffffffa0197690>] handle_tx_kick+0x10/0x20 [vhost_net]
      [<ffffffffa019541e>] vhost_worker+0xfe/0x1a0 [vhost_net]
      [<ffffffffa0195320>] ? vhost_attach_cgroups_work+0x30/0x30 [vhost_net]
      [<ffffffffa0195320>] ? vhost_attach_cgroups_work+0x30/0x30 [vhost_net]
      [<ffffffff81061f46>] kthread+0xc6/0xd0
      [<ffffffff81061e80>] ? kthread_freezable_should_stop+0x70/0x70
      [<ffffffff817a1aec>] ret_from_fork+0x7c/0xb0
      [<ffffffff81061e80>] ? kthread_freezable_should_stop+0x70/0x70
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4364d5f9
  4. 10 6月, 2013 3 次提交
    • K
      xen/tmem: Don't over-write tmem_frontswap_poolid after tmem_frontswap_init set it. · b2c75c44
      Konrad Rzeszutek Wilk 提交于
      Commit 10a7a077 ("xen: tmem: enable Xen
      tmem shim to be built/loaded as a module") allows the tmem module
      to be loaded any time. For this work the frontswap API had to
      be able to asynchronously to call tmem_frontswap_init before
      or after the swap image had been set. That was added in git
      commit 905cd0e1
      ("mm: frontswap: lazy initialization to allow tmem backends to build/run as modules").
      
      Which means we could do this (The common case):
      
       modprobe tmem		[so calls frontswap_register_ops, no ->init]
      			 modifies tmem_frontswap_poolid = -1
       swapon /dev/xvda1	[__frontswap_init, calls -> init, tmem_frontswap_poolid is
      			 < 0 so tmem hypercall done]
      
      Or the failing one:
      
       swapon /dev/xvda1	[calls __frontswap_init, sets the need_init bitmap]
       modprobe tmem		[calls frontswap_register_ops, -->init calls, finds out
      			tmem_frontswap_poolid is 0, does not make a hypercall.
      			Later in the module_init, sets tmem_frontswap_poolid=-1]
      
      Which meant that in the failing case we would not call the hypercall
      to initialize the pool and never be able to make any frontswap
      backend calls.
      
      Moving the frontswap_register_ops after setting the tmem_frontswap_poolid
      fixes it.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NBob Liu <bob.liu@oracle.com>
      b2c75c44
    • D
      drm/i915: prefer VBT modes for SVDO-LVDS over EDID · c3456fb3
      Daniel Vetter 提交于
      In
      
      commit 53d3b4d7
      Author: Egbert Eich <eich@suse.de>
      Date:   Tue Jun 4 17:13:21 2013 +0200
      
          drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC
      
      Egbert Eich fixed a long-standing bug where we simply used a
      non-working i2c controller to read the EDID for SDVO-LVDS panels.
      Unfortunately some machines seem to not be able to cope with the mode
      provided in the EDID. Specifically they seem to not be able to cope
      with a 4x pixel mutliplier instead of a 2x one, which seems to have
      been worked around by slightly changing the panels native mode in the
      VBT so that the dotclock is just barely above 50MHz.
      
      Since it took forever to notice the breakage it's fairly safe to
      assume that at least for SDVO-LVDS panels the VBT contains fairly sane
      data. So just switch around the order and use VBT modes first.
      
      v2: Also add EDID modes just in case, and spell Egbert correctly.
      
      v3: Elaborate a bit more about what's going on on Chris' machine.
      
      Cc: Egbert Eich <eich@suse.de>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65524
      Cc: stable@vger.kernel.org
      Reported-and-tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c3456fb3
    • C
      drm/i915: Enable hotplug interrupts after querying hw capabilities. · 7ba220ce
      Chris Wilson 提交于
      sdvo->hotplug_active is initialised during intel_sdvo_setup_outputs(),
      and so we never enabled the hotplug interrupts on SDVO as we were
      checking too early.
      
      This regression has been introduced somewhere in the hpd rework for
      the storm detection and handling starting with
      
      commit 1d843f9d
      Author: Egbert Eich <eich@suse.de>
      Date:   Mon Feb 25 12:06:49 2013 -0500
      
          DRM/I915: Add enum hpd_pin to intel_encoder.
      
      and the follow-up patches to use the new encoder->hpd_pin variable for
      the different irq setup functions.
      
      The problem is that encoder->hpd_pin was set up _before_ the output
      setup was done and so before we could assess the hotplug capabilities
      of the outputs on an sdvo encoder.
      Reported-by: NAlex Fiestas <afiestas@kde.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58405Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add regression note.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7ba220ce