10 Aug, 2010

2 commits

  • Fix etherdevice.h parameter name typo in kernel-doc:

    Warning(include/linux/etherdevice.h:138): No description found for parameter 'hwaddr'
    Warning(include/linux/etherdevice.h:138): Excess function parameter 'addr' description in 'dev_hw_addr_random'

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • drivers/net/wan/farsync.c: In function 'fst_intr_rx':
    drivers/net/wan/farsync.c:1312: warning: cast to pointer from integer of different size
    drivers/net/wan/farsync.c: In function 'do_bottom_half_tx':
    drivers/net/wan/farsync.c:1407: warning: cast to pointer from integer of different size

    The "skb" and "mem" arguments being passed here are DMA addresses
    being programmed into the hardware registers, so pass them as the type
    that they actually are. And use the correct printf formatting in
    debug logging statements for these things to match the type change.

    Reported-by: Andrew Morton
    Signed-off-by: David S. Miller

    David S. Miller
     

09 Aug, 2010

4 commits

  • Adds documentation for the igbvf (igb virtual function driver).

    v2:
    - Removed trailing white space
    - Removed Ethtool version info

    Signed-off-by: Jeff Kirsher
    Tested-by: Jeff Pieper
    Signed-off-by: David S. Miller

    Jeff Kirsher
     
  • Add documentation for the igb networking driver.

    v2:
    - Removed trailing white space
    - Removed Ethtool version info
    - Removed LRO kernel version info

    Signed-off-by: Jeff Kirsher
    Tested-by: Jeff Pieper
    Signed-off-by: David S. Miller

    Jeff Kirsher
     
  • Based on patches from Sonny Rao and Milton Miller...

    Combined the patches to fix up clean_tx_irq and clean_rx_irq.

    The PowerPC architecture does not require loads to independent bytes
    to be ordered without adding an explicit barrier.

    In ixgbe_clean_rx_irq we load the status bit then load the packet data.
    With packet split disabled if these loads go out of order we get a
    stale packet, but we will notice the bad sequence numbers and drop it.

    The problem occurs with packet split enabled where the TCP/IP header
    and data are in different descriptors. If the reads go out of order
    we may have data that doesn't match the TCP/IP header. Since we use
    hardware checksumming this bad data is never verified and it makes it
    all the way to the application.

    This bug was found during stress testing and adding this barrier has
    been shown to fix it. The bug can manifest as a data integrity issue
    (bad payload data) or as a BUG in skb_pull().

    This was a nasty bug to hunt down, if people agree with the fix I think
    it's a candidate for stable.

    Previously Submitted to e1000-devel only for ixgbe

    http://marc.info/?l=e1000-devel&m=126593062701537&w=3

    We've now seen this problem hit with other device drivers (e1000e mostly)
    So I'm resubmitting with fixes for other Intel Device Drivers with
    similar issues.

    CC: Milton Miller
    CC: Anton Blanchard
    CC: Sonny Rao
    CC: stable
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Kirsher
     
  • Building ixgbe without DCB_CONFIG and FCOE_CONFIG will cause
    a build error. This resolves the build error by wrapping
    the fcoe.up in CONFIG_IXGBE_DCB ifdefs.

    Also frames were being priority VLAN tagged even without DCB
    enabled. This fixes this so that 8021Q priority tags are
    only added with DCB actually enabled.

    Reported-by: divya
    Reported-by: Jon Mason
    Signed-off-by: John Fastabend
    Tested-by: Stephen Ko
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    John Fastabend
     

08 Aug, 2010

7 commits

  • Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • I moved the kfree(cb) below the dereferences.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • We should unlock here. This is the only place where we return from the
    function with the lock held. The caller isn't expecting it.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • We were seeing faults in the solos-pci receive tasklet when packets
    arrived for a VCC which was currently being closed:

    [18842.727906] EIP: [] br2684_push+0x19/0x234 [br2684] SS:ESP 0068:dfb89d14

    [18845.090712] [] ? do_page_fault+0x0/0x2e1
    [18845.120042] [] ? br2684_push+0x19/0x234 [br2684]
    [18845.153530] [] solos_bh+0x28b/0x7c8 [solos_pci]
    [18845.186488] [] ? solos_irq+0x2d/0x51 [solos_pci]
    [18845.219960] [] ? handle_irq+0x3b/0x48
    [18845.247732] [] ? irq_exit+0x34/0x57
    [18845.274437] [] tasklet_action+0x42/0x69
    [18845.303247] [] __do_softirq+0x8e/0x129
    [18845.331540] [] do_softirq+0x25/0x2a
    [18845.358274] [] _local_bh_enable_ip+0x5e/0x6a
    [18845.389677] [] local_bh_enable+0xb/0xe
    [18845.417944] [] ppp_unregister_channel+0x32/0xbb [ppp_generic]
    [18845.458193] [] pppox_unbind_sock+0x18/0x1f [pppox]

    This patch uses an RCU-inspired approach to fix it. In the RX tasklet's
    find_vcc() function we first refuse to use a VCC which already has the
    ATM_VF_READY bit cleared. And in the VCC close function, we synchronise
    with the tasklet to ensure that it can't still be using the VCC before
    we continue and allow the VCC to be destroyed.

    Signed-off-by: David Woodhouse
    Tested-by: Nathan Williams
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    David Woodhouse
     
  • Since there was added ->tcf_chain() method without ->bind_tcf() to
    sch_sfq class options, there is oops when a filter is added with
    the classid parameter.

    Fixes commit 7d2681a6ff4f9ab5e48d02550b4c6338f1638998
    netdev thread: null pointer at cls_api.c

    Signed-off-by: Jarek Poplawski
    Reported-by: Franchoze Eric
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Although netif_rx() isn't expected to be called in process context with
    preemption enabled, it'd better handle this case. And this is why get_cpu()
    is used in the non-RPS #ifdef branch. If tree RCU is selected,
    rcu_read_lock() won't disable preemption, so preempt_disable() should be
    called explictly.

    Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • tcp_parse_md5sig_option doesn't check md5sig option (TCPOPT_MD5SIG)
    length, but tcp_v[46]_inbound_md5_hash assume that it's at least 16
    bytes long.

    Signed-off-by: Dmitry Popov
    Signed-off-by: David S. Miller

    Dmitry Popov
     

07 Aug, 2010

3 commits


06 Aug, 2010

9 commits


05 Aug, 2010

15 commits

  • I often use "ethtool -i" command to check what driver controls the
    ehternet device. But because current virtio_net driver doesn't
    support "ethtool -i", it becomes the following:

    # ethtool -i eth3
    Cannot get driver information: Operation not supported

    This patch simply adds the "ethtool -i" support. The following is the
    result when using the virtio_net driver with my patch applied to.

    # ethtool -i eth3
    driver: virtio_net
    version: N/A
    firmware-version: N/A
    bus-info: virtio0

    Personally, "-i" is one of the most frequently-used option, and most
    network drivers support "ethtool -i", so I think virtio_net also
    should do.

    Signed-off-by: Taku Izumi
    Signed-off-by: Rusty Russell (use ARRAY_SIZE)
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • The PPP channel ops structure should be const.
    Cleanup the declarations to use standard C99 format.

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

    stephen hemminger
     
  • RxRPC can potentially deadlock as rxrpc_resend_time_expired() wants to get
    call->state_lock so that it can alter the state of an RxRPC call. However, its
    caller (call_timer_fn()) has an apparent lock on the timer struct.

    The problem is that rxrpc_resend_time_expired() isn't permitted to lock
    call->state_lock as this could cause a deadlock against rxrpc_send_abort() as
    that takes state_lock and then attempts to delete the resend timer by calling
    del_timer_sync().

    The deadlock can occur because del_timer_sync() will sit there forever waiting
    for rxrpc_resend_time_expired() to return, but the latter may then wait for
    call->state_lock, which rxrpc_send_abort() holds around del_timer_sync()...

    This leads to a warning appearing in the kernel log that looks something like
    the attached.

    It should be sufficient to simply dispense with the locks. It doesn't matter
    if we set the resend timer expired event bit and queue the event processor
    whilst we're changing state to one where the resend timer is irrelevant as the
    event can just be ignored by the processor thereafter.

    =======================================================
    [ INFO: possible circular locking dependency detected ]
    2.6.35-rc3-cachefs+ #115
    -------------------------------------------------------
    swapper/0 is trying to acquire lock:
    (&call->state_lock){++--..}, at: [] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]

    but task is already holding lock:
    (&call->resend_timer){+.-...}, at: [] run_timer_softirq+0x182/0x2a5

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (&call->resend_timer){+.-...}:
    [] __lock_acquire+0x889/0x8fa
    [] lock_acquire+0x57/0x6d
    [] del_timer_sync+0x3c/0x86
    [] rxrpc_send_abort+0x50/0x97 [af_rxrpc]
    [] rxrpc_kernel_abort_call+0xa1/0xdd [af_rxrpc]
    [] afs_deliver_to_call+0x129/0x368 [kafs]
    [] afs_process_async_call+0x54/0xff [kafs]
    [] worker_thread+0x1ef/0x2e2
    [] kthread+0x7a/0x82
    [] kernel_thread_helper+0x4/0x10

    -> #0 (&call->state_lock){++--..}:
    [] validate_chain+0x727/0xd23
    [] __lock_acquire+0x889/0x8fa
    [] lock_acquire+0x57/0x6d
    [] _raw_read_lock_bh+0x34/0x43
    [] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
    [] run_timer_softirq+0x1f3/0x2a5
    [] __do_softirq+0xa2/0x13e
    [] call_softirq+0x1c/0x28
    [] do_softirq+0x38/0x80
    [] irq_exit+0x45/0x47
    [] smp_apic_timer_interrupt+0x88/0x96
    [] apic_timer_interrupt+0x13/0x20
    [] cpu_idle+0x4d/0x83
    [] start_secondary+0x1bd/0x1c1

    other info that might help us debug this:

    1 lock held by swapper/0:
    #0: (&call->resend_timer){+.-...}, at: [] run_timer_softirq+0x182/0x2a5

    stack backtrace:
    Pid: 0, comm: swapper Not tainted 2.6.35-rc3-cachefs+ #115
    Call Trace:
    [] print_circular_bug+0xae/0xbd
    [] validate_chain+0x727/0xd23
    [] __lock_acquire+0x889/0x8fa
    [] ? mark_lock+0x42f/0x51f
    [] lock_acquire+0x57/0x6d
    [] ? rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
    [] _raw_read_lock_bh+0x34/0x43
    [] ? rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
    [] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
    [] run_timer_softirq+0x1f3/0x2a5
    [] ? run_timer_softirq+0x182/0x2a5
    [] ? rxrpc_resend_time_expired+0x0/0x96 [af_rxrpc]
    [] ? __do_softirq+0x69/0x13e
    [] __do_softirq+0xa2/0x13e
    [] call_softirq+0x1c/0x28
    [] do_softirq+0x38/0x80
    [] irq_exit+0x45/0x47
    [] smp_apic_timer_interrupt+0x88/0x96
    [] apic_timer_interrupt+0x13/0x20
    [] ? __atomic_notifier_call_chain+0x0/0x86
    [] ? mwait_idle+0x6e/0x78
    [] ? mwait_idle+0x65/0x78
    [] cpu_idle+0x4d/0x83
    [] start_secondary+0x1bd/0x1c1

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     
  • The packet length should be checked before the packet data is dereferenced.

    Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • The packet length should be checked before the packet data is dereferenced.

    Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • The packet length should be checked before the packet data is dereferenced.

    Signed-off-by: Changli Gao
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Changli Gao
     
  • Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • On the TX path, skb->data points to the ethernet header, not the network
    header. So when validating the packet length for accessing we should
    take the ethernet header into account.

    Signed-off-by: Changli Gao
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Changli Gao
     
  • Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • free_netdev finally calls kfree which makes the contents
    of ndev and priv (private data contained in ndev) invalid.

    So iounmap should be called before free_netdev.

    Cc: David S. Miller
    Cc: Chaithrika U S
    Cc: Sriramakrishnan
    Cc: Kevin Hilman
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Stefan Weil
    Signed-off-by: David S. Miller

    Stefan Weil
     
  • IRQ and resource[] may not have correct values until
    after PCI hotplug setup occurs at pci_enable_device() time.

    The semantic match that finds this problem is as follows:

    //
    @@
    identifier x;
    identifier request ~= "pci_request.*|pci_resource.*";
    @@

    (
    * x->irq
    |
    * x->resource
    |
    * request(x, ...)
    )
    ...
    *pci_enable_device(x)
    //

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     
  • IRQ and resource[] may not have correct values until
    after PCI hotplug setup occurs at pci_enable_device() time.

    The semantic match that finds this problem is as follows:

    //
    @@
    identifier x;
    identifier request ~= "pci_request.*|pci_resource.*";
    @@

    (
    * x->irq
    |
    * x->resource
    |
    * request(x, ...)
    )
    ...
    *pci_enable_device(x)
    //

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     
  • IRQ and resource[] may not have correct values until
    after PCI hotplug setup occurs at pci_enable_device() time.

    The semantic match that finds this problem is as follows:

    //
    @@
    identifier x;
    identifier request ~= "pci_request.*|pci_resource.*";
    @@

    (
    * x->irq
    |
    * x->resource
    |
    * request(x, ...)
    )
    ...
    *pci_enable_device(x)
    //

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits)
    Documentation: update broken web addresses.
    fix comment typo "choosed" -> "chosen"
    hostap:hostap_hw.c Fix typo in comment
    Fix spelling contorller -> controller in comments
    Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault
    fs/Kconfig: Fix typo Userpace -> Userspace
    Removing dead MACH_U300_BS26
    drivers/infiniband: Remove unnecessary casts of private_data
    fs/ocfs2: Remove unnecessary casts of private_data
    libfc: use ARRAY_SIZE
    scsi: bfa: use ARRAY_SIZE
    drm: i915: use ARRAY_SIZE
    drm: drm_edid: use ARRAY_SIZE
    synclink: use ARRAY_SIZE
    block: cciss: use ARRAY_SIZE
    comment typo fixes: charater => character
    fix comment typos concerning "challenge"
    arm: plat-spear: fix typo in kerneldoc
    reiserfs: typo comment fix
    update email address
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (30 commits)
    Revert "HID: add support for the Wacom Intuos 4 wireless"
    HID: fix up Kconfig entry for ACRUX driver
    HID: add ACRUX game controller force feedback support
    HID: Force input registration for "VEC footpedal"
    HID: add HID_QUIRK_HIDINPUT_FORCE
    HID: hid-input.c: indentation fixes
    HID: hiddev: use usb_find_interface, get rid of BKL
    HID: ignore digitizer usage Undefined (0x00)
    HID: Add support for Conceptronic CLLRCMCE
    HID: hid-ids.h: Whitespace fixup, align using TABs
    HID: picolcd: implement refcounting of framebuffer
    HID: picolcd: do not reallocate memory on depth change
    HID: picolcd: Add minimal palette required by fbcon on 8bpp
    HID: magicmouse: Correct parsing of large X and Y motions.
    HID: magicmouse: report last touch up
    HID: picolcd: fix deferred_io init/cleanup to fb ordering
    HID: hid-ids.h: keep vendor ids in alphabetical order
    HID: add proper support for Elecom BM084 bluetooth mouse
    HID: magicmouse: enable horizontal scrolling
    HID: magicmouse: add param for scroll speed
    ...

    Linus Torvalds