1. 18 5月, 2012 7 次提交
  2. 17 5月, 2012 17 次提交
    • M
      virtio_net: invoke softirqs after __napi_schedule · ec13ee80
      Michael S. Tsirkin 提交于
      __napi_schedule might raise softirq but nothing
      causes do_softirq to trigger, so it does not in fact
      run. As a result,
      the error message "NOHZ: local_softirq_pending 08"
      sometimes occurs during boot of a KVM guest when the network service is
      started and we are oom:
      
        ...
        Bringing up loopback interface:  [  OK  ]
        Bringing up interface eth0:
        Determining IP information for eth0...NOHZ: local_softirq_pending 08
         done.
        [  OK  ]
        ...
      
      Further, receive queue processing might get delayed
      indefinitely until some interrupt triggers:
      virtio_net expected napi to be run immediately.
      
      One way to cause do_softirq to be executed is by
      invoking local_bh_enable(). As __napi_schedule is
      normally called from bh or irq context, this
      seems to make sense: disable bh before __napi_schedule
      and enable afterwards.
      
      In fact it's a very complicated way of calling do_softirq(),
      and works since this function is only used when we are not
      in interrupt context.  It's not hot at all, in any ideal scenario.
      Reported-by: NUlrich Obergfell <uobergfe@redhat.com>
      Tested-by: NUlrich Obergfell <uobergfe@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      ec13ee80
    • A
      virtio: balloon: let host know of updated balloon size before module removal · b8ae0eb3
      Amit Shah 提交于
      When the balloon module is removed, we deflate the balloon, reclaiming
      all the pages that were given to the host.  However, we don't update the
      config values for the new balloon size, resulting in the host showing
      outdated balloon values.
      
      The size update is done after each leak and fill operation, only the
      module removal case was left out.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      b8ae0eb3
    • A
      virtio: console: tell host of open ports after resume from s3/s4 · fa8b66cc
      Amit Shah 提交于
      If a port was open before going into one of the sleep states, the port
      can continue normal operation after restore.  However, the host has to
      be told that the guest side of the connection is open to restore
      pre-suspend state.
      
      This wasn't noticed so far due to a bug in qemu that was fixed recently
      (which marked the guest-side connection as always open).
      
      CC: stable@vger.kernel.org   # Only for 3.3
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      fa8b66cc
    • B
      ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller · ad3b8a83
      Barry Song 提交于
      the old codes will cause 3.4 kernel warning as irq domain size is wrong:
      ------------[ cut here ]------------
      WARNING: at kernel/irq/irqdomain.c:74 irq_domain_legacy_revmap+0x24/0x48()
      Modules linked in:
      [<c0013f50>] (unwind_backtrace+0x0/0xf8) from [<c001e7d8>] (warn_slowpath_common+0x54/0x64)
      [<c001e7d8>] (warn_slowpath_common+0x54/0x64) from [<c001e804>] (warn_slowpath_null+0x1c/0x24)
      [<c001e804>] (warn_slowpath_null+0x1c/0x24) from [<c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48)
      [<c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48) from [<c005c704>] (irq_create_mapping+0x20/0x120)
      [<c005c704>] (irq_create_mapping+0x20/0x120) from [<c005c880>] (irq_create_of_mapping+0x7c/0xf0)
      [<c005c880>] (irq_create_of_mapping+0x7c/0xf0) from [<c01a6c48>] (irq_of_parse_and_map+0x2c/0x34)
      [<c01a6c48>] (irq_of_parse_and_map+0x2c/0x34) from [<c01a6c68>] (of_irq_to_resource+0x18/0x74)
      [<c01a6c68>] (of_irq_to_resource+0x18/0x74) from [<c01a6ce8>] (of_irq_count+0x24/0x34)
      [<c01a6ce8>] (of_irq_count+0x24/0x34) from [<c01a7220>] (of_device_alloc+0x58/0x158)
      [<c01a7220>] (of_device_alloc+0x58/0x158) from [<c01a735c>] (of_platform_device_create_pdata+0x3c/0x80)
      [<c01a735c>] (of_platform_device_create_pdata+0x3c/0x80) from [<c01a7468>] (of_platform_bus_create+0xc8/0x190)
      [<c01a7468>] (of_platform_bus_create+0xc8/0x190) from [<c01a74cc>] (of_platform_bus_create+0x12c/0x190)
      ---[ end trace 1b75b31a2719ed32 ]---
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      ad3b8a83
    • J
      MD: Add del_timer_sync to mddev_suspend (fix nasty panic) · 0d9f4f13
      Jonathan Brassow 提交于
      Use del_timer_sync to remove timer before mddev_suspend finishes.
      
      We don't want a timer going off after an mddev_suspend is called.  This is
      especially true with device-mapper, since it can call the destructor function
      immediately following a suspend.  This results in the removal (kfree) of the
      structures upon which the timer depends - resulting in a very ugly panic.
      Therefore, we add a del_timer_sync to mddev_suspend to prevent this.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      0d9f4f13
    • N
      md/raid10: set dev_sectors properly when resizing devices in array. · 6508fdbf
      NeilBrown 提交于
      raid10 stores dev_sectors in 'conf' separately from the one in
      'mddev' because it can have a very significant effect on block
      addressing and so need to be updated carefully.
      
      However raid10_resize isn't updating it at all!
      
      To update it correctly, we need to make sure it is a proper
      multiple of the chunksize taking various details of the layout
      in to account.
      This calculation is currently done in setup_conf.   So split it
      out from there and call it from raid10_resize as well.
      Then set conf->dev_sectors properly.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      6508fdbf
    • L
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 0e93b4b3
      Linus Torvalds 提交于
      Pull kvm powerpc fixes from Marcelo Tosatti:
       "Urgent KVM PPC updates, quoting Alexander Graf:
      
          There are a few bugs in 3.4 that really should be fixed before
          people can be all happy and fuzzy about KVM on PowerPC.  These fixes
          are:
      
           * fix POWER7 bare metal with PR=y
           * fix deadlock on HV=y book3s_64 mode in low memory cases
           * fix invalid MMU scope of PR=y mode on book3s_64, possibly eading
             to memory corruption"
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates
        powerpc/kvm: Fix VSID usage in 64-bit "PR" KVM
        KVM: PPC: Book3S: PR: Fix hsrr code
        KVM: PPC: Fix PR KVM on POWER7 bare metal
        KVM: PPC: Book3S: PR: Handle EMUL_ASSIST
      0e93b4b3
    • L
      Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b724cc19
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "A few last-minute regression fixes for 3.4 final kernel.  All trivial,
        and Cc'ed to stable kernel."
      
      * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: wm8994: Fix AIF2ADC power down
        ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptops
        ASoC: cs42l73: Sync digital mixer kcontrols to allow for 0dB
      b724cc19
    • L
      Merge tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc · f8fc341b
      Linus Torvalds 提交于
      Pull remoteproc fix from Ohad Ben-Cohen:
       "Fix a nasty off-by-one remoteproc bug which leaks memory when a remote
        processor is shut down and, on certain circumstances, can indirectly
        prevent it from being reloaded."
      
      * tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
        remoteproc: fix off-by-one bug in __rproc_free_vrings
      f8fc341b
    • L
      Merge git://git.samba.org/sfrench/cifs-2.6 · dfae359f
      Linus Torvalds 提交于
      Pull CIFS fix from Jeff Layton
      
      * git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix misspelling of "forcedirectio"
      dfae359f
    • L
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 39d6411b
      Linus Torvalds 提交于
      Pull two Tile arch fixes from Chris Metcalf:
       "These are both bug-fixes, one to avoid some issues in how we invoke
        the "pending userspace work" flags on return to userspace, and the
        other to provide the same signal handler arguments for tilegx32 that
        we do for tilegx64."
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: apply commit 74fca9da to the compat signal handling as well
        arch/tile: fix up some issues in calling do_work_pending()
      39d6411b
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 80116529
      Linus Torvalds 提交于
      Pull networking tree from David Miller:
      
      1) ptp_pch driver build broke during this merge window due to missing
         slab.h header, fix from Geery Uytterhoeven.
      
      2) If ipset passes in a bogus hash table size we crash because the size
         is not validated properly.  Compounding this, gcc-4.7 can miscompile
         ipset such that even when the user specifies legitimate parameters
         the tool passes in an out-of-range size to the kernel.
      
         Fix from Jozsef Kadlecsik.
      
      3) Users have reported that the netdev watchdog can trigger with pch_gbe
         devices, and it turns out this is happening because of races in the
         TX path of the driver leading to the transmitter hanging.  Fix from
         Eric Dumazet, reported and tested by Andy Cress.
      
      4) Novatel USB551L devices match the generic class entries for the cdc
         ethernet USB driver, but they don't work because they have generic
         descriptors and thus need FLAG_WWAN to function properly.
      
         Add the necessary ID table entry to fix this, from Dan Williams.
      
      5) A recursive locking fix in the USBNET driver added a new problem, in
         that packet list traversal is now racy and we can thus access
         unlinked SKBs and crash.
      
         Avoid this situation by adding some extra state tracking, from Ming
         Lei.
      
      6) The rtlwifi conversion to asynchronous firmware loading is racy, fix
         by reordering the probe procedure.  From Larry Finger.
      
         Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=43187
      
      7) Fix regressions with bluetooth keyboards by notifying userland
         properly when the security level changes, from Gustavo Padovan.
      
      8) Bluetooth needs to make sure device connected events are emitted
         before other kinds of events, otherwise userspace will think there is
         no baseband link yet and therefore abort the sockets associated with
         that connection.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        netfilter: ipset: fix hash size checking in kernel
        ptp_pch: Add missing #include <linux/slab.h>
        pch_gbe: fix transmit races
        cdc_ether: add Novatel USB551L device IDs for FLAG_WWAN
        usbnet: fix skb traversing races during unlink(v2)
        Bluetooth: mgmt: Fix device_connected sending order
        Bluetooth: notify userspace of security level change
        rtlwifi: fix for race condition when firmware is cached
      80116529
    • C
      arch/tile: apply commit 74fca9da to the compat signal handling as well · a134d228
      Chris Metcalf 提交于
      This passes siginfo and mcontext to tilegx32 signal handlers that
      don't have SA_SIGINFO set just as we have been doing for tilegx64.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      a134d228
    • C
      arch/tile: fix up some issues in calling do_work_pending() · fc327e26
      Chris Metcalf 提交于
      First, we were at risk of handling thread-info flags, in particular
      do_signal(), when returning from kernel space.  This could happen
      after a failed kernel_execve(), or when forking a kernel thread.
      The fix is to test in do_work_pending() for user_mode() and return
      immediately if so; we already had this test for one of the flags,
      so I just hoisted it to the top of the function.
      
      Second, if a ptraced process updated the callee-saved registers
      in the ptregs struct and then processed another thread-info flag, we
      would overwrite the modifications with the original callee-saved
      registers.  To fix this, we add a register to note if we've already
      saved the registers once, and skip doing it on additional passes
      through the loop.  To avoid a performance hit from the couple of
      extra instructions involved, I modified the GET_THREAD_INFO() macro
      to be guaranteed to be one instruction, then bundled it with adjacent
      instructions, yielding an overall net savings.
      Reported-By: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      fc327e26
    • J
      netfilter: ipset: fix hash size checking in kernel · 26a5d3cc
      Jozsef Kadlecsik 提交于
      The hash size must fit both into u32 (jhash) and the max value of
      size_t. The missing checking could lead to kernel crash, bug reported
      by Seblu.
      Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      26a5d3cc
    • G
      ptp_pch: Add missing #include <linux/slab.h> · 769b0daf
      Geert Uytterhoeven 提交于
      drivers/ptp/ptp_pch.c: In function 'pch_remove':
      drivers/ptp/ptp_pch.c:576:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
      drivers/ptp/ptp_pch.c: In function 'pch_probe':
      drivers/ptp/ptp_pch.c:587:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      769b0daf
    • J
      cifs: fix misspelling of "forcedirectio" · 531c8ff0
      Jeff Layton 提交于
      ...and add a "directio" synonym since that's what the manpage has
      always advertised.
      Acked-by: NSachin Prabhu <sprabhu@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      531c8ff0
  3. 16 5月, 2012 16 次提交