15 Aug, 2012

2 commits

  • Like the previous patch, slave_disable_netpoll() and __netpoll_cleanup()
    may be called with read_lock() held too, so we should make them
    non-block, by moving the cleanup and kfree() to call_rcu_bh() callbacks.

    Cc: "David S. Miller"
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Amerigo Wang
     
  • slave_enable_netpoll() and __netpoll_setup() may be called
    with read_lock() held, so should use GFP_ATOMIC to allocate
    memory. Eric suggested to pass gfp flags to __netpoll_setup().

    Cc: Eric Dumazet
    Cc: "David S. Miller"
    Reported-by: Dan Carpenter
    Signed-off-by: Eric Dumazet
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Amerigo Wang
     

14 Aug, 2012

4 commits

  • Pull s390 patches from Martin Schwidefsky:
    "Included are bug fixes and a patch to enable system call filtering
    with BPF."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/compat: fix mmap compat system calls
    s390/compat: fix compat wrappers for process_vm system calls
    s390: do not clobber personality flags in sys_32_personality()
    s390/seccomp: add support for system call filtering using BPF
    s390/sclp_sdias: Add missing break and "fall through"
    s390/mm: remove MAX_PHYSADDR_BITS define

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Radeon and intel fixes mostly, one fix to the mgag200 driver to not
    hang on certain server variants."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (32 commits)
    drm/radeon: fix typo in function header comment
    drm/radeon/kms: implement timestamp userspace query (v2)
    drm/radeon/kms: add MSAA texture support for r600-evergreen
    drm/radeon/kms: reorder code in r600_check_texture_resource
    drm/radeon: fence virtual address and free it once idle v4
    drm/radeon: fix some missing parens in asic macros
    drm/radeon: add some new SI pci ids
    drm/radeon: fix ordering in pll picking on dce4+
    drm/radeon: do not reenable crtc after moving vram start address
    drm/radeon: fix bank tiling parameters on cayman
    drm/radeon: fix bank tiling parameters on evergreen
    drm/radeon: fix bank tiling parameters on SI
    drm/radeon: properly handle crtc powergating
    drm/radeon: properly handle SS overrides on TN (v2)
    drm/radeon/dce4+: set a more reasonable cursor watermark
    drm/radeon: fix handling for ddc type 5 on combios
    drm/mgag200: fix G200ER pll picking algorithm
    drm/edid: Fix potential memory leak in edid_load()
    drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
    drm/radeon/kms: allow "invalid" DB formats as a means to disable DB
    ...

    Linus Torvalds
     
  • Commit 7212157267 ("GPIO: gpio-pxa: fix devicetree functions") added an
    "xlate" function pointer to the irq_domain_ops, but this function is nor
    declared or defined anywhere when CONFIG_OF is disabled, causing the
    build error:

    drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function)

    Extending the DT-only code section to cover the irq_domain_ops and the
    pxa_gpio_dt_ids solves this problem and makes it clearer which code is
    actually used without DT.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Alex Deucher writes:
    This is the current set of radeon fixes for 3.6. Nothing too major.

    Highlights:
    - various display fixes
    - some SI fixes
    - new SI pci ids
    - major VM fix
    - CS checker support for MSAA

    I've tested on a number of cards across generations and noticed no problems.

    * 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux:
    drm/radeon: fix typo in function header comment
    drm/radeon/kms: implement timestamp userspace query (v2)
    drm/radeon/kms: add MSAA texture support for r600-evergreen
    drm/radeon/kms: reorder code in r600_check_texture_resource
    drm/radeon: fence virtual address and free it once idle v4
    drm/radeon: fix some missing parens in asic macros
    drm/radeon: add some new SI pci ids
    drm/radeon: fix ordering in pll picking on dce4+
    drm/radeon: do not reenable crtc after moving vram start address
    drm/radeon: fix bank tiling parameters on cayman
    drm/radeon: fix bank tiling parameters on evergreen
    drm/radeon: fix bank tiling parameters on SI
    drm/radeon: properly handle crtc powergating
    drm/radeon: properly handle SS overrides on TN (v2)
    drm/radeon/dce4+: set a more reasonable cursor watermark
    drm/radeon: fix handling for ddc type 5 on combios

    Dave Airlie
     

13 Aug, 2012

31 commits

  • Signed-off-by: Dmitrii Cherkasov
    Signed-off-by: Alex Deucher

    Dmitrii Cherkasov
     
  • Returns a snapshot of the GPU clock counter. Needed
    for certain OpenGL extensions.

    v2: agd5f
    - address Jerome's comments
    - add function documentation

    Signed-off-by: Marek Olšák
    Reviewed-by: Jerome Glisse
    Signed-off-by: Alex Deucher

    Marek Olšák
     
  • Most of the checking seems to be in place already. As you can see,
    log2(number of samples) resides in LAST_LEVEL.

    This is required for MSAA support (namely for depth-stencil resolve and
    blitting between MSAA resources).

    Signed-off-by: Marek Olšák
    Reviewed-by: Jerome Glisse
    Signed-off-by: Alex Deucher

    Marek Olšák
     
  • Signed-off-by: Marek Olšák
    Reviewed-by: Jerome Glisse
    Signed-off-by: Alex Deucher

    Marek Olšák
     
  • Virtual address need to be fenced to know when we can safely remove it.
    This patch also properly clear the pagetable. Previously it was
    serouisly broken.

    Kernel 3.5/3.4 need a similar patch but adapted for difference in mutex locking.

    v2: For to update pagetable when unbinding bo (don't bailout if
    bo_va->valid is true).
    v3: Add kernel 3.5/3.4 comment.
    v4: Fix compilation warnings.

    Signed-off-by: Jerome Glisse
    Reviewed-by: Alex Deucher

    Jerome Glisse
     
  • Better safe than sorry.

    Signed-off-by: Alex Deucher
    Reviewed-by: Jerome Glisse

    Alex Deucher
     
  • Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • No functional change, but re-order the cases so they
    evaluate properly due to the way the DCE macros work.

    Noticed by kallisti5 on IRC.

    Signed-off-by: Alex Deucher

    Alex Deucher
     
  • It seems we can not update the crtc scanout address. After disabling
    crtc, update to base address do not take effect after crtc being
    reenable leading to at least frame being scanout from the old crtc
    base address. Disabling crtc display request lead to same behavior.

    So after changing the vram address if we don't keep crtc disabled
    we will have the GPU trying to read some random system memory address
    with some iommu this will broke the crtc engine and will lead to
    broken display and iommu error message.

    So to avoid this, disable crtc. For flicker less boot we will need
    to avoid moving the vram start address.

    This patch should also fix :

    https://bugs.freedesktop.org/show_bug.cgi?id=42373

    Cc:
    Signed-off-by: Jerome Glisse

    Jerome Glisse
     
  • Handle the 16 bank case.

    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • Handle the 16 bank case.

    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • The sixteen bank case wasn't handled here, leading to GPU
    crashes because of userspace miscalculation.

    Signed-off-by: Christian König
    Cc: stable@vger.kernel.org
    Signed-off-by: Alex Deucher

    Christian König
     
  • Need to make sure the crtc is gated on before modesetting.
    Explicitly gate the crtc on in prepare() and set a flag
    so that the dpms functions don't gate it off during
    mode set.

    Noticed by sylware on IRC.

    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • The IntegratedSystemInfo table changed versions
    on TN. Update the SS override lookup to handle it.

    v2: fix copy-paste typo.

    Signed-off-by: Alex Deucher

    Alex Deucher
     
  • Set a more reasonable default cursor watermark. The
    recommended default value is 4. This should reduce
    urgency requests to the MC form the display hw.

    Signed-off-by: Alex Deucher

    Alex Deucher
     
  • When ddc type is 5, need to look up the i2c channel
    in the i2c table.

    Signed-off-by: Alex Deucher

    Alex Deucher
     
  • Pull leds fixes/revert from Bryan Wu.

    * 'fixes-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
    leds: renesas: fix error handling
    Revert "leds: use led_set_brightness in led_trigger_event"
    leds: lp8788: Fix updating scale configuration bits

    Linus Torvalds
     
  • bfe4c041 "leds: convert Renesas TPU LED driver to devm_kzalloc() and
    cleanup error exit path" introduced a possible case in which r_tpu_probe
    calls iounmap on a wild pointer. This changes the one case that was
    missed in the same way as the other error paths.

    Without this patch, building kota2_defconfig results in:

    drivers/leds/leds-renesas-tpu.c: In function 'r_tpu_probe':
    drivers/leds/leds-renesas-tpu.c:246:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]
    drivers/leds/leds-renesas-tpu.c:308:17: warning: 'p' may be used uninitialized in this function [-Wuninitialized]

    Signed-off-by: Arnd Bergmann
    Cc: Magnus Damm
    Signed-off-by: Bryan Wu

    Arnd Bergmann
     
  • This reverts commit a0193cbee0809d65362a0767b2d50306b145b2f5.

    The problem with the original commit was that it caused a warning with
    the MMC trigger calling del_timer_sync from hard-irq context.

    Signed-off-by: Fabio Baltieri
    Reported-by: Pawel Moll
    Signed-off-by: Bryan Wu

    Fabio Baltieri
     
  • Pull networking changes from David Miller:
    "Most importantly this should cure the ipv4-mapped ipv6 socket TCP
    crashes some people were seeing, otherwise:

    1) Fix e1000e autonegotiation handling regression, from Tushar Dave.

    2) Fix TX data corruption race on e1000e down, also from Tushar Dave.

    3) Fix bfin_sir IRDA driver build, from Sonic Zhang.

    4) AF_PACKET mmap() tests a flag in the TX ring shared between
    userspace and the kernel for an internal consistency check. It
    really shouldn't do this to validate the kernel's own behavior
    because the user can corrupt it to be any value at all. From
    Daniel Borkmann.

    5) Fix TCP metrics leak on netns dismantle, from Eric Dumazet.

    6) Orphan the anonymous TCP socket from the SKB in
    ip_send_unicast_reply() so that the rest of the stack needn't see
    it. Otherwise we get selinux problems of all sorts, from Eric
    Dumazet.

    This is the best way to fix this since the socket is just a place
    holder for sending packets in a context where we have no real
    socket at all.

    7) Fix TUN detach crashes, from Stanislav Kinsbursky.

    8) dev_set_alias() leaks memory on krealloc() failure, from Alexey
    Khoroshilov.

    9) FIB trie must use call_rcu() not call_rcu_bh(), because this code
    is not universally invoked from software interrupts. From Eric
    Dumazet.

    10) PPTP looks up ipv4 routes with the wrong network namespace, fix
    from Gao Feng."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits)
    bnx2x: Fix compiler warnings
    af_packet: remove BUG statement in tpacket_destruct_skb
    macvtap: rcu_dereference outside read-lock section
    codel: refine one condition to avoid a nul rec_inv_sqrt
    ixgbe: add missing braces
    ipv4: fix ip_send_skb()
    net: tcp: ipv6_mapped needs sk_rx_dst_set method
    ipv4: tcp: unicast_sock should not land outside of TCP stack
    bnx2x: Fix recovery flow cleanup during probe
    bnx2x: fix unload previous driver flow when flr-capable
    tun: don't zeroize sock->file on detach
    igb: Fix register defines for all non-82575 hardware
    e1000e: fix panic while dumping packets on Tx hang with IOMMU
    igb: fix panic while dumping packets on Tx hang with IOMMU
    tcp: must free metrics at net dismantle
    net/stmmac: mark probe function as __devinit
    lpc_eth: remove obsolete ifdefs
    net/core: Fix potential memory leak in dev_set_alias()
    cdc-phonet: Don't leak in usbpn_open
    batman-adv: Fix mem leak in the batadv_tt_local_event() function
    ...

    Linus Torvalds
     
  • Pull tcm_vhost level target fabric driver from Nicholas Bellinger:
    "Here is the PULL request for the initial merge of tcm_vhost based on
    RFC-v5 code with MST's ACK appended to the initial merge commit."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    tcm_vhost: Initial merge for vhost level target fabric driver

    Linus Torvalds
     
  • Fix the following compiler warnings:

    - drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:2908:3: warning: comparison
    of distinct pointer types lacks a cast [enabled by default]
    - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:1709:7: warning: comparison
    of distinct pointer types lacks a cast [enabled by default]

    Signed-off-by: Joren Van Onder
    Acked-By: Yuval Mintz
    Signed-off-by: David S. Miller

    Joren Van Onder
     
  • Here's a quote of the comment about the BUG macro from asm-generic/bug.h:

    Don't use BUG() or BUG_ON() unless there's really no way out; one
    example might be detecting data structure corruption in the middle
    of an operation that can't be backed out of. If the (sub)system
    can somehow continue operating, perhaps with reduced functionality,
    it's probably not BUG-worthy.

    If you're tempted to BUG(), think again: is completely giving up
    really the *only* solution? There are usually better options, where
    users don't need to reboot ASAP and can mostly shut down cleanly.

    In our case, the status flag of a ring buffer slot is managed from both sides,
    the kernel space and the user space. This means that even though the kernel
    side might work as expected, the user space screws up and changes this flag
    right between the send(2) is triggered when the flag is changed to
    TP_STATUS_SENDING and a given skb is destructed after some time. Then, this
    will hit the BUG macro. As David suggested, the best solution is to simply
    remove this statement since it cannot be used for kernel side internal
    consistency checks. I've tested it and the system still behaves /stable/ in
    this case, so in accordance with the above comment, we should rather remove it.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    danborkmann@iogearbox.net
     
  • rcu_dereference occurs in update section. Replacement by
    rcu_dereference_protected in order to prevent lockdep
    complaint.

    Found by Linux Driver Verification project (linuxtesting.org)

    Signed-off-by: Denis Efremov
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Denis Efremov
     
  • Pull gpio fixes from Linus Walleij:
    - Fix a resource leak in the SCH driver
    - Fix the register address calculation in the MSIC driver
    - Fix the PXA driver's devicetree functions
    - Delete redundant shadow variable leftovers in the MXC driver
    - Specify the GPIO base for the device tree probe in the MXC driver
    - Add a modalias for the i.MX driver
    - Fix off-by-one bug in the Samsung driver
    - Fix erroneous errorpath in the Langwell driver

    * tag 'gpio-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    drivers/gpio/gpio-langwell.c: fix error return code
    gpio: samsung: Fix off-by-one bug in gpio addresses
    ARM: dts: imx: add alias for gpio
    gpio/mxc: specify gpio base for device tree probe
    gpio/mxc: remove redundant shadow variables initialization
    GPIO: gpio-pxa: fix devicetree functions
    gpio: msic: Fix calculating register address in msic_gpio_to_oreg()
    gpio-sch: Fix leak of resource

    Linus Torvalds
     
  • Pull a security subsystem fix from James Morris
    "This fixes an issue in the Yama LSM"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    Yama: higher restrictions should block PTRACE_TRACEME

    Linus Torvalds
     
  • Pull power management fixes from Rafael J. Wysocki:

    - Fix for two recent regressions in the generic PM domains framework.

    - Revert of a commit that introduced a resume regression and is
    conceptually incorrect in my opinion.

    - Fix for a return value in pcc-cpufreq.c from Julia Lawall.

    - RTC wakeup signaling fix from Neil Brown.

    - Suppression of compiler warnings for CONFIG_PM_SLEEP unset in ACPI,
    platform/x86 and TPM drivers.

    * tag 'pm-for-3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    tpm_tis / PM: Fix unused function warning for CONFIG_PM_SLEEP
    platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP
    ACPI / PM: Fix unused function warnings for CONFIG_PM_SLEEP
    Revert "NMI watchdog: fix for lockup detector breakage on resume"
    PM: Make dev_pm_get_subsys_data() always return 0 on success
    drivers/cpufreq/pcc-cpufreq.c: fix error return code
    RTC: Avoid races between RTC alarm wakeup and suspend.

    Linus Torvalds
     
  • Pull arm-soc bug fixes from Arnd Bergmann:
    "These are a bunch of bug fixes that came in after the merge window and
    one update for the MAINTAINERS file.

    The largest part of the fixes are patches that address bugs found by
    building all the ARM defconfig files. There are a lot more warnings
    that we have patches for, but the others are either still under
    discussion or are harmless and do not cause actual problems besides
    making the build slightly noisy."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits)
    ARM: davinci: remove broken ntosd2_init_i2c
    ARM: s3c24xx: enable CONFIG_BUG for tct_hammer
    omap-rng: fix use of SIMPLE_DEV_PM_OPS
    spi/s3c64xx: improve error handling
    mtd/omap2: fix dmaengine_slave_config error handling
    gpio: em: do not discard em_gio_irq_domain_cleanup
    ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
    ARM: imx: gpmi-nand depends on mxs-dma
    ARM: integrator: include
    ARM: s3c24xx: use new PWM driver
    ARM: sa1100: include linux/io.h in hackkit leds code
    Input: eeti_ts: pass gpio value instead of IRQ
    ARM: pxa: remove irq_to_gpio from ezx-pcap driver
    ARM: tegra: more regulator fixes for Harmony
    usb/ohci-omap: remove unused variable
    mfd/asic3: fix asic3_mfd_probe return value
    ARM: kirkwood: fix typo in Makefile.boot
    i.MX27: Fix emma-prp and csi clocks.
    ARM: integrator: use clk_prepare_enable() for timer
    MAINTAINERS: update entry for Linus Walleij
    ...

    Linus Torvalds
     
  • …owski/linux-dma-mapping

    Pull three dma-mapping fixes from Marek Szyprowski.

    * 'fixes-for-linus-for-3.6-rc2' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: dma-mapping: fix incorrect freeing of atomic allocations
    ARM: dma-mapping: fix atomic allocation alignment
    ARM: mm: fix MMU mapping of CMA regions

    Linus Torvalds
     
  • Pull btrfs merge fix from Chris Mason:
    "This fixes a merge error in rc1. The calls to mnt_want_write should
    have been removed."

    * 'for-linus-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: remove mnt_want_write call in btrfs_mksubvol

    Linus Torvalds
     
  • While tracking down a weird buffer overflow issue in a program that
    looked to be sane, I started double checking the length returned by
    syslog(SYSLOG_ACTION_READ_ALL, ...) to make sure it wasn't overflowing
    the buffer.

    Sure enough, it was. I saw this in strace:

    11339 syslog(SYSLOG_ACTION_READ_ALL, "[244017.708129] REISERFS (dev"..., 8192) = 8279

    It turns out that the loops that calculate how much space the entries
    will take when they're copied don't include the newlines and prefixes
    that will be included in the final output since prev flags is passed as
    zero.

    This patch properly accounts for it and fixes the overflow.

    CC: stable@kernel.org
    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     

11 Aug, 2012

3 commits

  • One condition before codel_Newton_step() was not good if
    we never left the dropping state for a flow. As a result
    rec_inv_sqrt was 0, instead of the ~0 initial value.

    codel control law was then set to a very aggressive mode, dropping
    many packets before reaching 'target' and recovering from this problem.

    To keep codel_vars_init() as efficient as possible, refine
    the condition to make sure rec_inv_sqrt initial value is correct

    Many thanks to Anton Mich for discovering the issue and suggesting
    a fix.

    Reported-by: Anton Mich
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This patch adds missing braces around the 10gig link check to include the check for KR support.

    Signed-off-by: Emil Tantilov
    Reported-by: Sascha Wildner
    Tested-by: Phil Schmitt
    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: David S. Miller

    Emil Tantilov
     
  • John W. Linville says:

    ====================
    Here is a handful of fixes intended for 3.6.

    Daniel Drake offers a cfg80211 fix to consume pending events before
    taking a wireless device down. This prevents a resource leak.

    Stanislaw Gruszka gives us a fix for a NULL pointer dereference in
    rt61pci.

    Johannes Berg provides an iwlwifi patch to disable "greenfield" mode.
    Use of that mode was causing a rate scaling problem in for iwlwifi.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller