18 Apr, 2011

1 commit


15 Apr, 2011

4 commits

  • Scot Doyle demonstrated ip_options_compile() could be called with an skb
    without an attached route, using a setup involving a bridge, netfilter,
    and forged IP packets.

    Let's make ip_options_compile() and ip_options_rcv_srr() a bit more
    robust, instead of changing bridge/netfilter code.

    With help from Hiroaki SHIMODA.

    Reported-by: Scot Doyle
    Tested-by: Scot Doyle
    Signed-off-by: Eric Dumazet
    Cc: Stephen Hemminger
    Acked-by: Hiroaki SHIMODA
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • The memory leak was caused by unintentional assignment of the Rx path
    destroy callback function pointer to NULL just after correct
    initialization.

    Signed-off-by: Debashis Dutt
    Signed-off-by: Rasesh Mody
    Signed-off-by: David S. Miller

    Rasesh Mody
     
  • During a kernel crash, bna control path state machine and firmware do not
    get a notification and hence are not cleanly shutdown. The registers
    holding driver/IOC state information are not reset back to valid
    disabled/parking values. This causes subsequent driver initialization
    to hang during kdump kernel boot. This patch, during the initialization
    of first PCI function, resets corresponding register when unclean shutown
    is detect by reading chip registers. This will make sure that ioc/fw
    gets clean re-initialization.

    Signed-off-by: Debashis Dutt
    Signed-off-by: Rasesh Mody
    Signed-off-by: David S. Miller

    Rasesh Mody
     
  • David S. Miller
     

14 Apr, 2011

5 commits

  • USB tethering does not work anymore since 2.6.39-rc2, but it's okay in
    -rc1. The root cause is the new added mask code 'FLAG_POINTTOPOINT'
    overlaps 'FLAG_MULTI_PACKET' in include/linux/usb/usbnet.h, this
    causes logic issue in rx_process(). This patch cleans up the overlap.

    Reported-and-Tested-by: Gottfried Haider
    Signed-off-by: Huajun Li
    Signed-off-by: David S. Miller

    huajun li
     
  • priv->tx_power_next is not initialized to max supported power,
    but instead default value is used, what cause errors like

    [ 58.597834] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
    [ 58.597839] iwl3945 0000:03:00.0: Error setting Tx power (-22).

    if maximum tx power read from the eeprom is smaller than default.
    In consequence card is unable to initialize properly. Fix the problem
    and cleanup tx power initialization.

    Reported-and-tested-by: Robin Dong
    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     
  • This reverts commit c191a836a908d1dd6b40c503741f91b914de3348.

    It causes known regressions for programs that expect to be able to use
    SO_REUSEADDR to shutdown a socket, then successfully rebind another
    socket to the same ID.

    Programs such as haproxy and amavisd expect this to work.

    This should fix kernel bugzilla 32832.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Machines are getting deadlock in four node cluster environment.
    All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
    200 GB storage on a GFS2 filesystem.
    This result in memory fragmentation and driver receives 18 frags for
    1448 byte packets.
    For non tso packet, fw drops the tx request, if it has >14 frags.

    Fixing it by pulling extra frags.

    Cc: stable@kernel.org
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Commit 74888760d40b3ac9054f9c5fa07b566c0676ba2d
    "dt/net: Eliminate users of of_platform_{,un}register_driver"
    broke building mscan driver. Fix it.

    Signed-off-by: Anatolij Gustschin
    Cc: Grant Likely
    Acked-by: Wolfgang Grandegger
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Anatolij Gustschin
     

13 Apr, 2011

16 commits

  • Since we can not update retran path to unconfirmed transports,
    when we remove a peer, the retran path may not be update if the
    other transports are all unconfirmed, and we will still using
    the removed transport as the retran path. This may cause panic
    if retrasnmit happen.

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • commit fbdf501c9374966a56829ecca3a7f25d2b49a305
    sctp: Do no select unconfirmed transports for retransmissions

    Introduced the initial falt.

    commit d598b166ced20d9b9281ea3527c0e18405ddb803
    sctp: Make sure we always return valid retransmit path

    Solved the problem, but forgot to change the DEBUG statement.
    Thus it was still possible to dereference a NULL pointer.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • NETIF_F_TSO_ECN has no effect when TSO is disabled; this just means
    that feature state will be accurately reported to user-space.

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

    Ben Hutchings
     
  • The feature flags NETIF_F_TSO and NETIF_F_TSO6 independently enable
    TSO for IPv4 and IPv6 respectively. However, the test in
    netdev_fix_features() and its predecessor functions was never updated
    to check for NETIF_F_TSO6, possibly because it was originally proposed
    that TSO for IPv6 would be dependent on both feature flags.

    Now that these feature flags can be changed independently from
    user-space and we depend on netdev_fix_features() to fix invalid
    feature combinations, it's important to disable them both if
    scatter-gather is disabled. Also disable NETIF_F_TSO_ECN so
    user-space sees all TSO features as disabled.

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

    Ben Hutchings
     
  • David S. Miller
     
  • Enabling write-combining may also enable read reordering. The BIU is
    only guaranteed to read from a 128-bit CSR or 64-bit SRAM word when
    the host reads from its lowest address; otherwise the BIU may use the
    latched value. Therefore we need to reinstate the read memory
    barriers after the first read operation for each CSR or SRAM word.

    Signed-off-by; Ben Hutchings

    Neil Turton
     
  • It adds -Wall (which the kernel carefully controls already) and of all
    things -DDEBUG (which should be set by other means if desired, please
    we have dynamic-debug these days).

    Kill this noise.

    Reported-by: Dave Jones
    Signed-off-by: David S. Miller

    David S. Miller
     
  • 5b40964eadea40509d353318d2c82e8b7bf5e8a5 ("irda: Remove BKL instances
    from af_irda.c") introduced a path where we have a locking unbalance.
    If we pass invalid flags, we unlock a socket we never locked,
    resulting in this...

    =====================================
    [ BUG: bad unlock balance detected! ]
    -------------------------------------
    trinity/20101 is trying to release lock (sk_lock-AF_IRDA) at:
    [] irda_sendmsg+0x207/0x21d [irda]
    but there are no more locks to release!

    other info that might help us debug this:
    no locks held by trinity/20101.

    stack backtrace:
    Pid: 20101, comm: trinity Not tainted 2.6.39-rc3+ #3
    Call Trace:
    [] ? irda_sendmsg+0x207/0x21d [irda]
    [] print_unlock_inbalance_bug+0xc7/0xd2
    [] ? irda_sendmsg+0x207/0x21d [irda]
    [] lock_release+0xcf/0x18e
    [] release_sock+0x2d/0x155
    [] irda_sendmsg+0x207/0x21d [irda]
    [] __sock_sendmsg+0x69/0x75
    [] sock_sendmsg+0xa1/0xb6
    [] ? might_fault+0x5c/0xac
    [] ? lock_release+0x181/0x18e
    [] ? might_fault+0xa5/0xac
    [] ? might_fault+0x5c/0xac
    [] ? fcheck_files+0xb9/0xf0
    [] ? copy_from_user+0x2f/0x31
    [] ? verify_iovec+0x52/0xa6
    [] sys_sendmsg+0x23a/0x2b8
    [] ? lock_release+0x181/0x18e
    [] ? up_read+0x28/0x2c
    [] ? do_page_fault+0x360/0x3b4
    [] ? trace_hardirqs_on_caller+0x10b/0x12f
    [] ? finish_task_switch+0xb2/0xe3
    [] ? finish_task_switch+0x46/0xe3
    [] ? trace_hardirqs_off_caller+0x33/0x90
    [] ? retint_swapgs+0x13/0x1b
    [] ? trace_hardirqs_on_caller+0x10b/0x12f
    [] ? audit_syscall_entry+0x11c/0x148
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] system_call_fastpath+0x16/0x1b

    Signed-off-by: Dave Jones
    Signed-off-by: David S. Miller

    Dave Jones
     
  • Signed-off-by: Otavio Salvador
    Signed-off-by: David S. Miller

    Otavio Salvador
     
  • Signed-off-by: Otavio Salvador
    Signed-off-by: David S. Miller

    Otavio Salvador
     
  • When a skb is delivered to a registered callback, cn_call_callback()
    incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
    to free the skb a second time.

    Reported-by: Eric B Munson
    Signed-off-by: Patrick McHardy
    Tested-by: Eric B Munson
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • controlling igmp_max_membership is useful even when IP_MULTICAST
    is off.
    Quagga(an OSPF deamon) uses multicast addresses for all interfaces
    using a single socket and hits igmp_max_membership limit when
    there are 20 interfaces or more.
    Always export sysctl igmp_max_memberships in proc, just like
    igmp_max_msf

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: David S. Miller

    Joakim Tjernlund
     
  • On 64bit arches, we use 752 bytes of stack when cleanup_once() is called
    from inet_getpeer().

    Lets share the avl stack to save ~376 bytes.

    Before patch :

    # objdump -d net/ipv4/inetpeer.o | scripts/checkstack.pl

    0x000006c3 unlink_from_pool [inetpeer.o]: 376
    0x00000721 unlink_from_pool [inetpeer.o]: 376
    0x00000cb1 inet_getpeer [inetpeer.o]: 376
    0x00000e6d inet_getpeer [inetpeer.o]: 376
    0x0004 inet_initpeers [inetpeer.o]: 112
    # size net/ipv4/inetpeer.o
    text data bss dec hex filename
    5320 432 21 5773 168d net/ipv4/inetpeer.o

    After patch :

    objdump -d net/ipv4/inetpeer.o | scripts/checkstack.pl
    0x00000c11 inet_getpeer [inetpeer.o]: 376
    0x00000dcd inet_getpeer [inetpeer.o]: 376
    0x00000ab9 peer_check_expire [inetpeer.o]: 328
    0x00000b7f peer_check_expire [inetpeer.o]: 328
    0x0004 inet_initpeers [inetpeer.o]: 112
    # size net/ipv4/inetpeer.o
    text data bss dec hex filename
    5163 432 21 5616 15f0 net/ipv4/inetpeer.o

    Signed-off-by: Eric Dumazet
    Cc: Scot Doyle
    Cc: Stephen Hemminger
    Cc: Hiroaki SHIMODA
    Reviewed-by: Hiroaki SHIMODA
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Pass the correct module name and device interface so that
    ethtool can display the proper values.

    The firmware version will be fixed later on when the FW
    can actually report a version. :)

    Reported-by: Richard Farina
    Signed-off-by: Sujith Manoharan
    Tested-by: Richard Farina
    Signed-off-by: John W. Linville

    Sujith Manoharan
     
  • During PHY errors, the MAC can sometimes fail to enter an idle state on older
    hardware (before AR9380) after an rx stop has been requested.

    This typically shows up in the kernel log with messages like these:

    ath: Could not stop RX, we could be confusing the DMA engine when we start RX up
    ------------[ cut here ]------------
    WARNING: at drivers/net/wireless/ath/ath9k/recv.c:504 ath_stoprecv+0xcc/0xf0 [ath9k]()
    Call Trace:
    [] dump_stack+0x8/0x34
    [] warn_slowpath_common+0x78/0xa4
    [] warn_slowpath_null+0x18/0x24
    [] ath_stoprecv+0xcc/0xf0 [ath9k]
    [] ath_set_channel+0xbc/0x270 [ath9k]
    [] ath_radio_disable+0x4a4/0x7fc [ath9k]

    When this happens, the state that the MAC enters is easy to identify and
    does not result in bogus DMA traffic, however to ensure a working state
    after a channel change, the hardware should still be reset.

    This patch adds detection for this specific MAC state, after which the above
    warnings completely disappear in my tests.

    Signed-off-by: Felix Fietkau
    Cc: stable@kernel.org
    Cc: Kyungwan Nam
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • Commit 462fb2af9788a82 (bridge : Sanitize skb before it enters the IP
    stack), missed one IPCB init before calling ip_options_compile()

    Thanks to Scot Doyle for his tests and bug reports.

    Reported-by: Scot Doyle
    Signed-off-by: Eric Dumazet
    Cc: Hiroaki SHIMODA
    Acked-by: Bandan Das
    Acked-by: Stephen Hemminger
    Cc: Jan Lübbe
    Signed-off-by: David S. Miller

    Eric Dumazet
     

12 Apr, 2011

14 commits

  • During self-tests we use efx_process_channel_now() to handle
    completion and other events synchronously. This disables interrupts
    and NAPI processing for the channel in question, but it may still be
    interrupted by another channel. A single socket may receive packets
    from multiple net devices or even multiple channels of the same net
    device, so this can result in deadlock on a socket lock.

    Receiving packets in process context will also result in incorrect
    classification by the network cgroup classifier.

    Therefore, we must only use efx_process_channel_now() in the offline
    loopback tests (which never deliver packets up the stack) and not for
    the online interrupt and event tests.

    For the interrupt test, there is no reason to process events. We
    only care that an interrupt is raised.

    For the event test, we want to know whether events have been received,
    and there may be many events ahead of the one we inject. Therefore
    remove efx_channel::magic_count and instead test whether
    efx_channel::eventq_read_ptr advances. This is currently an event
    queue index and might wrap around to exactly the same value, resulting
    in a false negative. Therefore move the masking to efx_event() and
    efx_nic_eventq_read_ack() so that it cannot wrap within the time of
    the test.

    The event test also tries to diagnose failures by checking whether an
    event was delivered without causing an interrupt. Add and use a
    helper function that only does this.

    Signed-off-by: Ben Hutchings

    Ben Hutchings
     
  • If the TX queues are running during loopback self tests, host
    traffic gets looped back which causes the test to fail. Avoid
    restarting the TX queues after the port reset so that any packets
    sent by the host get held back until after the tests have completed.

    [bwh: Also wake all TX queues at the end of self-tests.]

    Signed-off-by: Ben Hutchings

    Neil Turton
     
  • Fixes bugzilla #32872

    The LLC stack pretends to support non-linear skbs but there is a
    direct use of skb_tail_pointer() in llc_fixup_skb().

    Use pskb_may_pull() to see if data_size bytes remain and can be
    accessed linearly in the packet, instead of direct pointer checks.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • In the CAIF Payload message the Packet Type indication must be set to
    UNCLASSIFIED in order to allow packet prioritization in the modem's
    network stack. Otherwise TCP-Ack is not prioritized in the modems
    transmit queue.

    Signed-off-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Sjur Brændeland
     
  • Signed-off-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Sjur Brændeland
     
  • Machines are getting deadlock in four node cluster environment.
    All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
    200 GB storage on a GFS2 filesystem.
    This result in memory fragmentation and driver receives 18 frags for
    1448 byte packets.
    For non tso packet, fw drops the tx request, if it has >14 frags.

    Fixing it by pulling extra frags.

    Cc: stable@kernel.org
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    amit salecha
     
  • replace relpy with reply.
    replace premanent with permanent.

    Signed-off-by: Weiping Pan(潘卫平)
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • replace tranmitted with transmitted.
    replace tranmitting with transmitting.

    Signed-off-by: Weiping Pan(潘卫平)
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • Now, alb_bond_info uses rx_ntt,rlb_update_delay_counter and
    rlb_update_retry_counter to decide when to call rlb_update_rx_clients().

    Signed-off-by: Weiping Pan(潘卫平)
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • Now bonding-alb uses delayed_work instead of timer_list.

    Signed-off-by: Weiping Pan(潘卫平)
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • It is unnecessary to set save_load to 1 here,
    as the tx_hashtbl is just kzalloced.

    Signed-off-by: Weiping Pan(潘卫平)
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • On some old MAC chips without COE sometime the
    Transmit Underflow error is issued.

    The driver aborted all the transmission process
    and initialized it from scratch.
    This breaks the network activity as raised by Nachiketa
    on a SPEAr board.

    The patch is to fix this rare underflow event.
    The driver will only clear the interrupt and the Tx
    DMA will go out the Suspend state as soon as the
    descriptor is fetched again.
    The driver will continue to bump-up the DMA FIFO threshold
    that, indeed, helped somebody to prevent this kind of error
    in the past as well.

    Reported-by: Nachiketa Prachanda
    Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     
  • This patch reviews the open function and fixes some
    errors when exit with an error state.
    It also moves the request_irq after core is initialized
    when interrupts are properly masked.

    Signed-off-by: Shiraz Hashim
    Hacked-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     
  • This patch fixes a compilation error when build the
    dwmac_lib with the DEBUG option enabled.

    Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO