24 Oct, 2011

3 commits

  • * git://git.infradead.org/iommu-2.6:
    intel-iommu: fix superpage support in pfn_to_dma_pte()
    intel-iommu: set iommu_superpage on VM domains to lowest common denominator
    intel-iommu: fix return value of iommu_unmap() API
    MAINTAINERS: Update VT-d entry for drivers/pci -> drivers/iommu move
    intel-iommu: Export a flag indicating that the IOMMU is used for iGFX.
    intel-iommu: Workaround IOTLB hang on Ironlake GPU
    intel-iommu: Fix AB-BA lockdep report

    Linus Torvalds
     
  • * 'for-linus' of http://people.redhat.com/agk/git/linux-dm:
    dm kcopyd: fix job_pool leak

    Linus Torvalds
     
  • Fix memory leak introduced by commit a6e50b409d3f9e0833e69c3c9cca822e8fa4adbb
    (dm snapshot: skip reading origin when overwriting complete chunk).

    When allocating a set of jobs from kc->job_pool, job->master_job must be
    set (to point to itself) so that the mempool item gets freed when the
    master_job completes.

    master_job was introduced by commit c6ea41fbbe08f270a8edef99dc369faf809d1bd6
    (dm kcopyd: preallocate sub jobs to avoid deadlock)

    Reported-by: Michael Leun
    Cc: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     

23 Oct, 2011

1 commit


21 Oct, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    fib_rules: fix unresolved_rules counting
    r8169: fix wrong eee setting for rlt8111evl
    r8169: fix driver shutdown WoL regression.
    ehea: Change maintainer to me
    pptp: pptp_rcv_core() misses pskb_may_pull() call
    tproxy: copy transparent flag when creating a time wait
    pptp: fix skb leak in pptp_xmit()
    bonding: use local function pointer of bond->recv_probe in bond_handle_frame
    smsc911x: Add support for SMSC LAN89218
    tg3: negate USE_PHYLIB flag check
    netconsole: enable netconsole can make net_device refcnt incorrent
    bluetooth: Properly clone LSM attributes to newly created child connections
    l2tp: fix a potential skb leak in l2tp_xmit_skb()
    bridge: fix hang on removal of bridge via netlink
    x25: Prevent skb overreads when checking call user data
    x25: Handle undersized/fragmented skbs
    x25: Validate incoming call user data lengths
    udplite: fast-path computation of checksum coverage
    IPVS netns shutdown/startup dead-lock
    netfilter: nf_conntrack: fix event flooding in GRE protocol tracker

    Linus Torvalds
     

20 Oct, 2011

3 commits

  • Since 8-bit temperature values are now handled in 16-bit struct
    members, values have to be cast to s8 for negative temperatures to be
    properly handled. This is broken since kernel version 2.6.39
    (commit bce26c58df86599c9570cee83eac58bdaae760e4.)

    Signed-off-by: Jean Delvare
    Cc: Guenter Roeck
    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: Guenter Roeck

    Jean Delvare
     
  • Correct the wrong parameter for setting EEE for RTL8111E-VL.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     
  • Due to commit 92fc43b4159b518f5baae57301f26d770b0834c9 ("r8169: modify the
    flow of the hw reset."), rtl8169_hw_reset stomps during driver shutdown on
    RxConfig bits which are needed for WOL on some versions of the hardware.

    As these bits were formerly set from the r81{0x, 68}_pll_power_down methods,
    factor them out for use in the driver shutdown (rtl_shutdown) handler.

    I favored __rtl8169_get_wol() -hardware state indication- over
    RTL_FEATURE_WOL as the latter has become a good candidate for removal.

    Signed-off-by: Francois Romieu
    Cc: Hayes
    Tested-by: Marc Ballarin
    Signed-off-by: David S. Miller

    françois romieu
     

19 Oct, 2011

12 commits

  • * 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus:
    [media] videodev: fix a NULL pointer dereference in v4l2_device_release()

    Linus Torvalds
     
  • The change in 8280b66 does not cover the case when v4l2_dev is already
    NULL, fix that.

    With a Kinect sensor, seen as an USB camera using GSPCA in this context,
    a NULL pointer dereference BUG can be triggered by just unplugging the
    device after the camera driver has been loaded.

    Signed-off-by: Antonio Ospite
    Signed-off-by: Mauro Carvalho Chehab

    Antonio Ospite
     
  • If target_level == 0, current code breaks out of the while-loop if
    SUPERPAGE bit is set. We should also break out if PTE is not present.
    If we don't do this, KVM calls to iommu_iova_to_phys() will cause
    pfn_to_dma_pte() to create mapping for 4KiB pages.

    Signed-off-by: Allen Kay
    Signed-off-by: David Woodhouse

    Allen Kay
     
  • set dmar->iommu_superpage field to the smallest common denominator
    of super page sizes supported by all active VT-d engines. Initialize
    this field in intel_iommu_domain_init() API so intel_iommu_map() API
    will be able to use iommu_superpage field to determine the appropriate
    super page size to use.

    Signed-off-by: Allen Kay
    Signed-off-by: David Woodhouse

    Allen Kay
     
  • iommu_unmap() API expects IOMMU drivers to return the actual page order
    of the address being unmapped. Previous code was just returning page
    order passed in from the caller. This patch fixes this problem.

    Signed-off-by: Allen Kay
    Signed-off-by: David Woodhouse

    Allen Kay
     
  • FB scratch indices are dword indices, but we were treating
    them as byte indices. As such, we were getting the wrong
    FB scratch data for non-0 indices. Fix the indices and
    guard the indexing against indices larger than the scratch
    allocation.

    Fixes memory corruption on some boards if data was written
    past the end of the FB scratch array.

    Signed-off-by: Alex Deucher
    Reported-by: Dave Airlie
    Tested-by: Dave Airlie
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • e1000e uses paged frags, so any layer incorrectly pulling bytes from skb
    can trigger a BUG in skb_pull()

    [951.142737] [] skb_pull+0x15/0x17
    [951.142737] [] pptp_rcv_core+0x126/0x19a [pptp]
    [951.152725] [] sk_receive_skb+0x69/0x105
    [951.163558] [] pptp_rcv+0xc8/0xdc [pptp]
    [951.165092] [] gre_rcv+0x62/0x75 [gre]
    [951.165092] [] ip_local_deliver_finish+0x150/0x1c1
    [951.177599] [] ? ip_local_deliver_finish+0x0/0x1c1
    [951.177599] [] NF_HOOK.clone.7+0x51/0x58
    [951.177599] [] ip_local_deliver+0x51/0x55
    [951.177599] [] ip_rcv_finish+0x31a/0x33e
    [951.177599] [] ? ip_rcv_finish+0x0/0x33e
    [951.204898] [] NF_HOOK.clone.7+0x51/0x58
    [951.214651] [] ip_rcv+0x21b/0x246

    pptp_rcv_core() is a nice example of a function assuming everything it
    needs is available in skb head.

    Reported-by: Bradley Peterson
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • In case we cant transmit skb, we must free it

    Signed-off-by: Eric Dumazet
    CC: Dmitry Kozlov
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • The bond->recv_probe is called in bond_handle_frame() when
    a packet is received, but bond_close() sets it to NULL. So,
    a panic occurs when both functions work in parallel.

    Why this happen:
    After null pointer check of bond->recv_probe, an sk_buff is
    duplicated and bond->recv_probe is called in bond_handle_frame.
    So, a panic occurs when bond_close() is called between the
    check and call of bond->recv_probe.

    Patch:
    This patch uses a local function pointer of bond->recv_probe
    in bond_handle_frame(). So, it can avoid the null pointer
    dereference.

    Signed-off-by: Mitsuo Hayasaka
    Cc: Jay Vosburgh
    Cc: Andy Gospodarek
    Cc: Eric Dumazet
    Cc: WANG Cong
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Mitsuo Hayasaka
     
  • LAN89218 is register compatible with LAN911x.

    Signed-off-by: Phil Edworthy
    Signed-off-by: David S. Miller

    Phil Edworthy
     
  • USE_PHYLIB flag in tg3_remove_one() is being checked incorrectly. This
    results tg3_phy_fini->phy_disconnect is never called and when tg3 module
    is removed.

    In my case this resulted in panics in phy_state_machine calling function
    phydev->adjust_link.

    So correct this check.

    Signed-off-by: Jiri Pirko
    Acked-by: Matt Carlson
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • There is no check if netconsole is enabled current.
    so when exec echo 1 > enabled;
    the reference of net_device will increment always.

    Signed-off-by: Gao feng
    Acked-by: Flavio Leitner
    Signed-off-by: David S. Miller

    Gao feng
     

18 Oct, 2011

4 commits


15 Oct, 2011

3 commits


14 Oct, 2011

4 commits

  • * 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
    gpio-pca953x: fix gpio_base
    gpio/omap: fix build error with certain OMAP1 configs

    Linus Torvalds
     
  • The w83627ehf driver is improperly reporting thermal diode sensors as
    type 2, instead of 3. This caused "sensors" and possibly other
    monitoring tools to report these sensors as "transistor" instead of
    "thermal diode".

    Furthermore, diode subtype selection (CPU vs. external) is only
    supported by the original W83627EHF/EHG. All later models only support
    CPU diode type, and some (NCT6776F) don't even have the register in
    question so we should avoid reading from it.

    Signed-off-by: Jean Delvare
    Cc: stable@kernel.org
    Signed-off-by: Guenter Roeck

    Jean Delvare
     
  • gpio_base was set to 0 if no system platform data or open firmware
    platform data was provided. This led to conflicts, if any other gpiochip
    with a gpiobase of 0 was instantiated already. Setting it to -1 will
    automatically use the first one available.

    Signed-off-by: Hartmut Knaack
    Signed-off-by: Grant Likely

    Hartmut Knaack
     
  • With commit f64ad1a0e21a, "gpio/omap: cleanup _set_gpio_wakeup(), remove
    ifdefs", access to build time conditionally omitted 'suspend_wakeup'
    member of the 'gpio_bank' structure has been placed unconditionally in
    function _set_gpio_wakeup(), which is always built. This resulted in the
    driver compilation broken for certain OMAP1, i.e., non-OMAP16xx,
    configurations.

    Really required or not in previously excluded cases, define this
    structure member unconditionally as a fix.

    Tested with a custom OMAP1510 only configuration.

    Signed-off-by: Janusz Krzysztofik
    Acked-by: Kevin Hilman
    Tested-by: Aaro Koskinen
    Signed-off-by: Grant Likely

    Janusz Krzysztofik
     

13 Oct, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    mscan: too much data copied to CAN frame due to 16 bit accesses
    gro: refetch inet6_protos[] after pulling ext headers
    bnx2x: fix cl_id allocation for non-eth clients for NPAR mode
    mlx4_en: fix endianness with blue frame support

    Linus Torvalds
     
  • Fix file references in drivers/ide/

    There are a lot of file references to now moved or deleted files in the
    whole tree, especially in documentation and Kconfig files. This patch
    fixes the references in drivers/ide/.

    Signed-off-by: Johann Felix Soden
    Signed-off-by: Randy Dunlap
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Johann Felix Soden
     

11 Oct, 2011

4 commits

  • When unbinding a device so that I could pass it through to a KVM VM, I
    got the lockdep report below. It looks like a legitimate lock
    ordering problem:

    - domain_context_mapping_one() takes iommu->lock and calls
    iommu_support_dev_iotlb(), which takes device_domain_lock (inside
    iommu->lock).

    - domain_remove_one_dev_info() starts by taking device_domain_lock
    then takes iommu->lock inside it (near the end of the function).

    So this is the classic AB-BA deadlock. It looks like a safe fix is to
    simply release device_domain_lock a bit earlier, since as far as I can
    tell, it doesn't protect any of the stuff accessed at the end of
    domain_remove_one_dev_info() anyway.

    BTW, the use of device_domain_lock looks a bit unsafe to me... it's
    at least not obvious to me why we aren't vulnerable to the race below:

    iommu_support_dev_iotlb()
    domain_remove_dev_info()

    lock device_domain_lock
    find info
    unlock device_domain_lock

    lock device_domain_lock
    find same info
    unlock device_domain_lock

    free_devinfo_mem(info)

    do stuff with info after it's free

    However I don't understand the locking here well enough to know if
    this is a real problem, let alone what the best fix is.

    Anyway here's the full lockdep output that prompted all of this:

    =======================================================
    [ INFO: possible circular locking dependency detected ]
    2.6.39.1+ #1
    -------------------------------------------------------
    bash/13954 is trying to acquire lock:
    (&(&iommu->lock)->rlock){......}, at: [] domain_remove_one_dev_info+0x121/0x230

    but task is already holding lock:
    (device_domain_lock){-.-...}, at: [] domain_remove_one_dev_info+0x208/0x230

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (device_domain_lock){-.-...}:
    [] lock_acquire+0x9d/0x130
    [] _raw_spin_lock_irqsave+0x55/0xa0
    [] domain_context_mapping_one+0x600/0x750
    [] domain_context_mapping+0x3f/0x120
    [] iommu_prepare_identity_map+0x1c5/0x1e0
    [] intel_iommu_init+0x88e/0xb5e
    [] pci_iommu_init+0x16/0x41
    [] do_one_initcall+0x45/0x190
    [] kernel_init+0xe3/0x168
    [] kernel_thread_helper+0x4/0x10

    -> #0 (&(&iommu->lock)->rlock){......}:
    [] __lock_acquire+0x195e/0x1e10
    [] lock_acquire+0x9d/0x130
    [] _raw_spin_lock_irqsave+0x55/0xa0
    [] domain_remove_one_dev_info+0x121/0x230
    [] device_notifier+0x72/0x90
    [] notifier_call_chain+0x8c/0xc0
    [] __blocking_notifier_call_chain+0x78/0xb0
    [] blocking_notifier_call_chain+0x16/0x20
    [] __device_release_driver+0xbc/0xe0
    [] device_release_driver+0x2f/0x50
    [] driver_unbind+0xa3/0xc0
    [] drv_attr_store+0x2c/0x30
    [] sysfs_write_file+0xe6/0x170
    [] vfs_write+0xce/0x190
    [] sys_write+0x54/0xa0
    [] system_call_fastpath+0x16/0x1b

    other info that might help us debug this:

    6 locks held by bash/13954:
    #0: (&buffer->mutex){+.+.+.}, at: [] sysfs_write_file+0x44/0x170
    #1: (s_active#3){++++.+}, at: [] sysfs_write_file+0xcd/0x170
    #2: (&__lockdep_no_validate__){+.+.+.}, at: [] driver_unbind+0x9b/0xc0
    #3: (&__lockdep_no_validate__){+.+.+.}, at: [] device_release_driver+0x27/0x50
    #4: (&(&priv->bus_notifier)->rwsem){.+.+.+}, at: [] __blocking_notifier_call_chain+0x5f/0xb0
    #5: (device_domain_lock){-.-...}, at: [] domain_remove_one_dev_info+0x208/0x230

    stack backtrace:
    Pid: 13954, comm: bash Not tainted 2.6.39.1+ #1
    Call Trace:
    [] print_circular_bug+0xf7/0x100
    [] __lock_acquire+0x195e/0x1e10
    [] ? trace_hardirqs_off+0xd/0x10
    [] ? trace_hardirqs_on_caller+0x13d/0x180
    [] lock_acquire+0x9d/0x130
    [] ? domain_remove_one_dev_info+0x121/0x230
    [] _raw_spin_lock_irqsave+0x55/0xa0
    [] ? domain_remove_one_dev_info+0x121/0x230
    [] ? trace_hardirqs_off+0xd/0x10
    [] domain_remove_one_dev_info+0x121/0x230
    [] device_notifier+0x72/0x90
    [] notifier_call_chain+0x8c/0xc0
    [] __blocking_notifier_call_chain+0x78/0xb0
    [] blocking_notifier_call_chain+0x16/0x20
    [] __device_release_driver+0xbc/0xe0
    [] device_release_driver+0x2f/0x50
    [] driver_unbind+0xa3/0xc0
    [] drv_attr_store+0x2c/0x30
    [] sysfs_write_file+0xe6/0x170
    [] vfs_write+0xce/0x190
    [] sys_write+0x54/0xa0
    [] system_call_fastpath+0x16/0x1b

    Signed-off-by: Roland Dreier
    Signed-off-by: David Woodhouse

    Roland Dreier
     
  • Due to the 16 bit access to mscan registers there's too much data copied to
    the zero initialized CAN frame when having an odd number of bytes to copy.
    This patch ensures that only the requested bytes are copied by using an
    8 bit access for the remaining byte.

    Reported-by: Andre Naujoks
    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     
  • There are some consolidations of NPAR configuration
    when FCoE and iSCSI L2 clients will get the same id,
    in this case FCoE ring will be non-functional.

    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • The doorbell register was being unconditionally swapped. In x86, that
    meant it was being swapped to BE and written to the descriptor and to
    memory, depending on the case of blue frame support or writing to
    doorbell register. On PPC, this meant it was being swapped to LE and
    then swapped back to BE while writing to the register. But in the blue
    frame case, it was being written as LE to the descriptor.

    The fix is not to swap doorbell unconditionally, write it to the
    register as BE and convert it to BE when writing it to the descriptor.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Reported-by: Richard Hendrickson
    Cc: Eli Cohen
    Cc: Yevgeny Petrilin
    Cc: Benjamin Herrenschmidt
    Signed-off-by: David S. Miller

    Thadeu Lima de Souza Cascardo
     

10 Oct, 2011

2 commits

  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1
    drm/radeon/kms: fix dp_detect handling for DP bridge chips
    drm/radeon/kms: retry aux transactions if there are status flags

    Linus Torvalds
     
  • * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (29 commits)
    MIPS: Call oops_enter, oops_exit in die
    staging/octeon: Software should check the checksum of no tcp/udp packets
    MIPS: Octeon: Enable C0_UserLocal probing.
    MIPS: No branches in delay slots for huge pages in handle_tlbl
    MIPS: Don't clobber CP0_STATUS value for CONFIG_MIPS_MT_SMTC
    MIPS: Octeon: Select CONFIG_HOLES_IN_ZONE
    MIPS: PM: Use struct syscore_ops instead of sysdevs for PM (v2)
    MIPS: Compat: Use 32-bit wrapper for compat_sys_futex.
    MIPS: Do not use EXTRA_CFLAGS
    MIPS: Alchemy: DB1200: Disable cascade IRQ in handler
    SERIAL: Lantiq: Set timeout in uart_port
    MIPS: Lantiq: Fix setting the PCI bus speed on AR9
    MIPS: Lantiq: Fix external interrupt sources
    MIPS: tlbex: Fix build error in R3000 code.
    MIPS: Alchemy: Include Au1100 in PM code.
    MIPS: Alchemy: Fix typo in MAC0 registration
    MIPS: MSP71xx: Fix build error.
    MIPS: Handle __put_user() sleeping.
    MIPS: Allow forced irq threading
    MIPS: i8259: Mark cascade interrupt non-threaded
    ...

    Linus Torvalds
     

07 Oct, 2011

1 commit

  • * git://github.com/davem330/net:
    net: fix typos in Documentation/networking/scaling.txt
    bridge: leave carrier on for empty bridge
    netfilter: Use proper rwlock init function
    tcp: properly update lost_cnt_hint during shifting
    tcp: properly handle md5sig_pool references
    macvlan/macvtap: Fix unicast between macvtap interfaces in bridge mode

    Linus Torvalds