26 Jan, 2010

14 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ASoC: fix a memory-leak in wm8903
    ALSA: hda - add possibility to choose speakers configuration for 4930g
    ALSA: hda - Fix HP T5735 automute
    ALSA: hda - Turn on EAPD only if available for Realtek codecs
    ALSA: hda - Fix parsing pin node 0x21 on ALC259

    Linus Torvalds
     
  • * 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: x86: Fix leak of free lapic date in kvm_arch_vcpu_init()
    KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks
    KVM: S390: fix potential array overrun in intercept handling
    KVM: fix spurious interrupt with irqfd
    eventfd - allow atomic read and waitqueue remove
    KVM: MMU: bail out pagewalk on kvm_read_guest error
    KVM: properly check max PIC pin in irq route setup
    KVM: only allow one gsi per fd
    KVM: x86: Fix host_mapping_level()
    KVM: powerpc: Show timing option only on embedded
    KVM: Fix race between APIC TMR and IRR

    Linus Torvalds
     
  • * 'linux-next' of git://git.infradead.org/ubi-2.6:
    UBI: fix memory leak in update path
    UBI: add more checks to chdev open
    UBI: initialise update marker

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog
    hwmon: (asus_atk0110) Do not fail if MBIF is missing
    hwmon: (amc6821) Double unlock bug
    hwmon: (smsc47m1) Fix section mismatch

    Linus Torvalds
     
  • * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (95 commits)
    drm/radeon/kms: preface warning printk with driver name
    drm/radeon/kms: drop unnecessary printks.
    drm: fix regression in fb blank handling
    drm/radeon/kms: make hibernate work on IGPs
    drm/vmwgfx: Optimize memory footprint for DMA buffers.
    drm/ttm: Allow system memory as a busy placement.
    drm/ttm: Fix race condition in ttm_bo_delayed_delete (v3, final)
    drm/nv50: prevent switching off SOR when in use for DVI-over-DP
    drm/nv50: fail auxch transaction if reply count not what we expect
    drm/nouveau: fix failure path if userspace specifies no valid memtypes
    drm/nouveau: report LVDS as disconnected if lid closed
    drm/radeon/kms: fix legacy get_engine/memory clock
    drm/radeon/kms/atom: atom parser fixes
    drm/radeon/kms: clean up atombios pll code
    drm/radeon/kms: clean up pll struct
    drm/radeon/kms/atom: fix crtc lock ordering
    drm/radeon: r6xx/r7xx possible security issue, system ram access
    drm/radeon/kms: r600/r700 don't test ib if ib initialization fails
    drm/radeon/kms: Forbid creation of framebuffer with no valid GEM object
    drm/radeon/kms: r600 handle irq vector ring overflow
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix IRQ ->set_affinity() methods.
    sparc: cpumask_of_node() should handle -1 as a node
    sparc64: Update defconfig.
    sparc: Add missing SW perf fault events.
    sparc64: Fully support both performance counters.
    sparc64: Add perf callchain support.
    sparc: convert to arch_gettimeoffset()
    sparc: leds_resource.end assigned to itself in clock_board_probe()
    sparc32: Fix page_to_phys().
    sparc: Simplify param.h by simply including
    sparc32: Update defconfig.
    SPARC: use helpers for rlimits
    sparc: copy_from_user() should not return -EFAULT

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
    virtio_net: Make delayed refill more reliable
    sfc: Use fixed-size buffers for MCDI NVRAM requests
    sfc: Add workspace for GMAC bug workaround to MCDI MAC_STATS buffer
    tcp_probe: avoid modulus operation and wrap fix
    qlge: Only free resources if they were allocated
    netns xfrm: deal with dst entries in netns
    sky2: revert config space change
    vlan: fix vlan_skb_recv()
    netns xfrm: fix "ip xfrm state|policy count" misreport
    sky2: Enable/disable WOL per hardware device
    net: Fix IPv6 GSO type checks in Intel ethernet drivers
    igb/igbvf: cleanup exception handling in tx_map_adv
    MAINTAINERS: Add Intel igbvf maintainer
    e1000/e1000e: don't use small hardware rx buffers
    fmvj18x_cs: add new id (Panasonic lan & modem card)
    be2net: swap only first 2 fields of mcc_wrb
    Please add support for Microsoft MN-120 PCMCIA network card
    be2net: fix bug in rx page posting
    wimax/i2400m: Add support for more i6x50 SKUs
    e1000e: enhance frame fragment detection
    ...

    Linus Torvalds
     
  • …/git/tmlind/linux-omap-2.6

    * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (25 commits)
    OMAP2/3: DMTIMER: Clear pending interrupts when stopping a timer
    PM debug: Fix warning when no CONFIG_DEBUG_FS
    OMAP3: PM: DSS PM_WKEN to refill DMA
    OMAP: timekeeping: time should not stop during suspend
    OMAP3: PM: Force write last pad config register into save area
    OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()
    OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules
    OMAP3: PM debug: fix build error when !CONFIG_DEBUG_FS
    OMAP3: PM: Removing redundant and potentially dangerous PRCM configration
    OMAP3: Fixed ARM aux ctrl register save/restore
    OMAP3: CPUidle: Fixed timer resolution
    OMAP3: PM: Remove duplicate code blocks
    OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI
    OMAP3: PM: Enable system control module autoidle
    OMAP3: PM: Ack pending interrupts before entering suspend
    omap: Enable GPMC clock in gpmc_init
    OMAP1 clock: fix for "BUG: spinlock lockup on CPU#0"
    OMAP4: clocks: Fix the clksel_rate struct DPLL divs
    OMAP4: PRCM: Fix the base address for CHIRONSS reg defines
    OMAP: dma_chan[lch_head].flag & OMAP_DMA_ACTIVE tested twice in omap_dma_unlink_lch()
    ...

    Linus Torvalds
     
  • I have seen RX stalls on a machine that experienced a suspected
    OOM. After the stall, the RX buffer is empty on the guest side
    and there are exactly 16 entries available on the host side. As
    the number of entries is less than that required by a maximal
    skb, the host cannot proceed.

    The guest did not have a refill job scheduled.

    My diagnosis is that an OOM had occured, with the delayed refill
    job scheduled. The job was able to allocate at least one skb, but
    not enough to overcome the minimum required by the host to proceed.

    As the refill job would only reschedule itself if it failed completely
    to allocate any skbs, this would lead to an RX stall.

    The following patch removes this stall possibility by always
    rescheduling the refill job until the ring is totally refilled.

    Testing has shown that the RX stall no longer occurs whereas
    previously it would occur within a day.

    Signed-off-by: Herbert Xu
    Acked-by: Rusty Russell
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • The low-level MCDI code always uses 32-bit MMIO operations, and
    callers must pad input and output buffers to multiples of 4 bytes.
    The MCDI NVRAM functions are not doing this. Also, their buffers are
    declared as variable-length arrays with no explicit maximum length.

    Switch to a fixed buffer size based on the chunk size used by the
    MTD driver (which is a multiple of 4).

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Due to a hardware bug in the SFC9000 family, the firmware must
    transfer raw GMAC statistics to host memory before aggregating them
    into the cooked (speed-independent) MAC statistics. Extend the stats
    buffer to support this.

    The length of the buffer is explicit in the MAC_STATS command, so this
    change is backward-compatible on both sides.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Guido Barzini
     
  • By rounding up the buffer size to power of 2, several expensive
    modulus operations can be avoided. This patch also solves a bug where
    the gap need when ring gets full was not being accounted for.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Currently qlge tries to release regions even if they were not allocated.
    This causes messages like the following in the kernel log

    Trying to free nonexistent resource
    Trying to free nonexistent resource
    Trying to free nonexistent resource

    This patch fixes the goto logic in order to not release the resources
    if they were not allocated.

    Signed-off-by: Breno Leitao
    Signed-off-by: David S. Miller

    Breno Leitao
     
  • Takashi Iwai
     

25 Jan, 2010

26 commits

  • Remember to free the temporary register-cache.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org

    Guennadi Liakhovetski
     
  • In function kvm_arch_vcpu_init(), if the memory malloc for
    vcpu->arch.mce_banks is fail, it does not free the memory
    of lapic date. This patch fixed it.

    Cc: stable@kernel.org
    Signed-off-by: Wei Yongjun
    Signed-off-by: Marcelo Tosatti

    Wei Yongjun
     
  • vcpu->arch.mce_banks is malloc in kvm_arch_vcpu_init(), but
    never free in any place, this may cause memory leak. So this
    patch fixed to free it in kvm_arch_vcpu_uninit().

    Cc: stable@kernel.org
    Signed-off-by: Wei Yongjun
    Signed-off-by: Marcelo Tosatti

    Wei Yongjun
     
  • kvm_handle_sie_intercept uses a jump table to get the intercept handler
    for a SIE intercept. Static code analysis revealed a potential problem:
    the intercept_funcs jump table was defined to contain (0x48 >> 2) entries,
    but we only checked for code > 0x48 which would cause an off-by-one
    array overflow if code == 0x48.

    Use the compiler and ARRAY_SIZE to automatically set the limits.

    Cc: stable@kernel.org
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Marcelo Tosatti

    Christian Borntraeger
     
  • kvm didn't clear irqfd counter on deassign, as a result we could get a
    spurious interrupt when irqfd is assigned back. this leads to poor
    performance and, in theory, guest crash.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Avi Kivity

    Michael S. Tsirkin
     
  • KVM needs a wait to atomically remove themselves from the eventfd ->poll()
    wait queue head, in order to handle correctly their IRQfd deassign
    operation.

    This patch introduces such API, plus a way to read an eventfd from its
    context.

    Signed-off-by: Davide Libenzi
    Signed-off-by: Avi Kivity

    Davide Libenzi
     
  • Exit the guest pagetable walk loop if reading gpte failed. Otherwise its
    possible to enter an endless loop processing the previous present pte.

    Cc: stable@kernel.org
    Signed-off-by: Marcelo Tosatti

    Marcelo Tosatti
     
  • Otherwise memory beyond irq_states[16] might be accessed.

    Noticed by Juan Quintela.

    Cc: stable@kernel.org
    Signed-off-by: Marcelo Tosatti
    Acked-by: Juan Quintela
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Looks like repeatedly binding same fd to multiple gsi's with irqfd can
    use up a ton of kernel memory for irqfd structures.

    A simple fix is to allow each fd to only trigger one gsi: triggering a
    storm of interrupts in guest is likely useless anyway, and we can do it
    by binding a single gsi to many interrupts if we really want to.

    Cc: stable@kernel.org
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Acked-by: Gregory Haskins
    Signed-off-by: Avi Kivity

    Michael S. Tsirkin
     
  • When found a error hva, should not return PAGE_SIZE but the level...

    Also clean up the coding style of the following loop.

    Cc: stable@kernel.org
    Signed-off-by: Sheng Yang
    Signed-off-by: Marcelo Tosatti

    Sheng Yang
     
  • Embedded PowerPC KVM has an exit timing implementation to track and evaluate
    how much time was spent in which exit path.

    For Book3S, we don't implement it. So let's not expose it as a config option
    either.

    Signed-off-by: Alexander Graf
    Signed-off-by: Avi Kivity

    Alexander Graf
     
  • When we queue an interrupt to the local apic, we set the IRR before the TMR.
    The vcpu can pick up the IRR and inject the interrupt before setting the TMR,
    and perhaps even EOI it, causing incorrect behaviour.

    The race is really insignificant since it can only occur on the first
    interrupt (usually following interrupts will not change TMR), but it's better
    closed than open.

    Fixed by reordering setting the TMR vs IRR.

    Cc: stable@kernel.org
    Signed-off-by: Avi Kivity
    Signed-off-by: Marcelo Tosatti

    Avi Kivity
     
  • When /dev/watchdog gets opened a second time we return -EBUSY, but
    we already have got a kref then, so we end up leaking our data struct.

    Signed-off-by: Hans de Goede
    Signed-off-by: Jean Delvare
    Cc: stable@kernel.org

    Hans de Goede
     
  • MBIF (motherboard identification) is only used to print the name of
    the board, it's not essential for the driver; do not fail if it's
    missing. Based on Juan's patch.

    Signed-off-by: Luca Tettamanti
    Acked-by: Juan RP
    Signed-off-by: Jean Delvare

    Luca Tettamanti
     
  • The mutex gets unlocked after we goto EXIT.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Jean Delvare

    Dan Carpenter
     
  • smsc47m1_restore is called from sm_smsc47m1_exit, which is an __exit
    function, so it can't be __init.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Jean Delvare

    Jeff Mahoney
     
  • Now one can choose speaker configuration in e.g. PulseAudio mixer

    Signed-off-by: Łukasz Wojniłowicz
    Signed-off-by: Takashi Iwai

    Łukasz Wojniłowicz
     
  • GC is non-existent in netns, so after you hit GC threshold, no new
    dst entries will be created until someone triggers cleanup in init_net.

    Make xfrm4_dst_ops and xfrm6_dst_ops per-netns.
    This is not done in a generic way, because it woule waste
    (AF_MAX - 2) * sizeof(struct dst_ops) bytes per-netns.

    Reorder GC threshold initialization so it'd be done before registering
    XFRM policies.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • Obviously, this register had some other impact that is causing
    the regression. Either it is masking some other access or needs
    to be reset in some path.

    Either, way it is best to just revert the change for 2.6.33

    This reverts commit 166a0fd4c788ec7f10ca8194ec6d526afa12db75.

    Signed-off-by: David S. Miller

    stephen hemminger
     
  • This just adds a little more info to the warning for old -ati/mesa
    userspaces.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • These printks aren't required anymore.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • commit 731b5a15a3b1474a41c2ca29b4c32b0f21bc852e
    Author: James Simmons
    Date: Thu Oct 29 20:39:07 2009 +0000

    drm/kms: properly handle fbdev blanking

    uses DRM_MODE_DPMS_ON for FB_BLANK_NORMAL, but DRM_MODE_DPMS_ON
    is actually for turning output on instead of blank.

    This makes fb blank broken on my T61, it put LVDS on but leave
    pipe disabled which made screen totally white or caused some
    'burning' effect.

    [airlied: James objects to this but at this point in 2.6.33,
    I can't see a patch that will fix this properly like he wants coming
    in time and otherwise this is a regression - proper fix for 2.6.34
    hopefully.]

    Cc: James Simmons
    Signed-off-by: Zhenyu Wang
    Signed-off-by: Dave Airlie

    Zhenyu Wang
     
  • This is the least invasive fix without migrating the radeon driver
    to pm_ops from what I can see. We just always migrate VRAM objects
    on IGPs for now and we can fix it up later to migrate depending
    on STR vs STD.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • Use VRAM whenever there is free space for DMA buffers,
    but use system GMR memory if using VRAM would cause an eviction.

    This significantly reduces the guest system memory usage for
    VMs with a large amount of VRAM allocated.

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • This is needed to fix a vmwgfx memory usage bug.

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • * korg/drm-radeon-next:
    drm/radeon/kms: fix legacy get_engine/memory clock
    drm/radeon/kms/atom: atom parser fixes
    drm/radeon/kms: clean up atombios pll code
    drm/radeon/kms: clean up pll struct
    drm/radeon/kms/atom: fix crtc lock ordering
    drm/radeon: r6xx/r7xx possible security issue, system ram access
    drm/radeon/kms: r600/r700 don't test ib if ib initialization fails
    drm/radeon/kms: Forbid creation of framebuffer with no valid GEM object
    drm/radeon/kms: r600 handle irq vector ring overflow
    drm/radeon/kms: r600/r700 don't process IRQ if not initialized
    drm/radeon/kms: r600/r700 disable irq at suspend
    drm/radeon/kms/r4xx: cleanup atom path
    drm/radeon/kms: fix atombios_crtc_set_base
    drm/radeon/kms/atom: upstream parser updates
    drm/radeon/kms/atom: fix some parser bugs
    drm/radeon/kms: fix hardcoded mmio size in register functions
    drm/radeon/kms/r100: fix bug in CS parser
    drm/radeon/kms/r200: fix bug in CS parser
    drm/radeon/kms/r200: fix bug in CS parser

    Dave Airlie