06 Jul, 2007

1 commit

  • >From my recent patch:

    > > #1
    > > Until kernel ver. 2.6.21 (including) cancel_rearming_delayed_work()
    > > required a work function should always (unconditionally) rearm with
    > > delay > 0 - otherwise it would endlessly loop. This patch replaces
    > > this function with cancel_delayed_work(). Later kernel versions don't
    > > require this, so here it's only for uniformity.

    But Oleg Nesterov found:

    > But 2.6.22 doesn't need this change, why it was merged?
    >
    > In fact, I suspect this change adds a race,
    ...

    His description was right (thanks), so this patch reverts #1.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

29 Jun, 2007

1 commit

  • #1
    Until kernel ver. 2.6.21 (including) cancel_rearming_delayed_work()
    required a work function should always (unconditionally) rearm with
    delay > 0 - otherwise it would endlessly loop. This patch replaces
    this function with cancel_delayed_work(). Later kernel versions don't
    require this, so here it's only for uniformity.

    #2
    After deleting a timer in cancel_[rearming_]delayed_work() there could
    stay a last skb queued in npinfo->txq causing a memory leak after
    kfree(npinfo).

    Initial patch & testing by: Jason Wessel

    Signed-off-by: Jarek Poplawski
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

27 Jun, 2007

1 commit

  • If sky2 device poll routine is called from netpoll_send_skb, it would
    deadlock. The netpoll_send_skb held the netif_tx_lock, and the poll
    routine could acquire it to clean up skb's. Other drivers might use
    same locking model.

    The driver is correct, netpoll should not introduce more locking
    problems than it causes already. So change the code to drop lock
    before calling poll handler.

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

    Stephen Hemminger
     

09 May, 2007

1 commit


26 Apr, 2007

10 commits


18 Apr, 2007

1 commit

  • In net poll mode, the current checksum function doesn't consider the
    kind of packet which is padded to reach a specific minimum length. I
    believe that's the problem causing my test case failed. The following
    patch fixed this issue.

    Signed-off-by: Aubrey.Li
    Signed-off-by: David S. Miller

    Aubrey.Li
     

11 Feb, 2007

1 commit


13 Dec, 2006

1 commit

  • current -git doesnt boot on my laptop due to netpoll not unlocking the
    tx lock in the else branch.

    booted this up on my laptop with lockdep enabled and there are no
    locking complaints and it works fine.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

12 Dec, 2006

2 commits

  • During boot we get:

    netconsole: device eth0 not up yet, forcing it
    e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex
    WARNING (!__warned) at kernel/softirq.c:137 local_bh_enable()

    Call Trace:
    [] local_bh_enable+0x41/0xa3
    [] netpoll_send_skb+0x116/0x144
    [] netpoll_send_udp+0x263/0x271
    [] write_msg+0x42/0x5e
    [] __call_console_drivers+0x5f/0x70
    [] _call_console_drivers+0x6d/0x71
    [] release_console_sem+0x148/0x1ec
    [] register_console+0x1b1/0x1ba
    [] init_netconsole+0x54/0x68
    [] init+0x152/0x308
    [] _spin_unlock_irq+0x14/0x30
    [] schedule_tail+0x43/0x9f
    [] child_rip+0xa/0x12

    Herbert sayeth:

    Normally networking isn't invoked with interrupts turned off, but I
    suppose we don't have a choice here. This is unique being a place where you
    can get called with BH on, off, or IRQs off.

    Given that this is only used for printk, the easiest solution is probably
    just to disable local IRQs instead of BH.

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

    Andrew Morton
     
  • Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Andrew Morton
     

09 Dec, 2006

1 commit

  • Back in 2.4 arp requests that were recevied by netpoll were processed
    in netconsole_receive_skb, where they were responded to using the src
    mac of the request sender. In the 2.6 kernel arp_reply is responsible
    for this function, but instead of using the src mac address of the
    incomming request, the stored mac address that was registered for the
    netconsole application is used. While this is usually ok, it can lead
    to failures in netpoll in some situations (specifically situations
    where a network may have two gateways, as arp requests from one may be
    responded to using the mac address of the other). This patch reverts
    the behavior to what we had in 2.4, in which all arp requests are sent
    back using the src address of the request sender.

    Signed-off-by: Neil Horman
    Acked-by: Chris Lalancette
    Signed-off-by: David S. Miller

    Neil Horman
     

05 Dec, 2006

1 commit


03 Dec, 2006

13 commits


22 Nov, 2006

1 commit


08 Nov, 2006

1 commit


20 Oct, 2006

1 commit


23 Sep, 2006

1 commit


26 Jun, 2006

2 commits

  • The netpoll system currently has a rx to tx path via:

    netpoll_rx
    __netpoll_rx
    arp_reply
    netpoll_send_skb
    dev->hard_start_tx

    This rx->tx loop places network drivers at risk of inadvertently causing a
    deadlock or BUG halt by recursively trying to acquire a spinlock that is
    used in both their rx and tx paths (this problem was origionally reported
    to me in the 3c59x driver, which shares a spinlock between the
    boomerang_interrupt and boomerang_start_xmit routines).

    This patch breaks this loop, by queueing arp frames, so that they can be
    responded to after all receive operations have been completed. Tested by
    myself and the reported with successful results.

    Specifically it was tested with netdump. Heres the BZ with details:
    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194055

    Signed-off-by: Neil Horman
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Neil Horman
     
  • When transmitting a skb in netpoll_send_skb(), only retry a limited number
    of times if the device queue is stopped.

    Signed-off-by: Jeremy Fitzhardinge
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jeremy Fitzhardinge