11 Jul, 2007

1 commit


26 Apr, 2007

2 commits


26 Mar, 2007

1 commit

  • ->neigh_destructor() is killed (not used), replaced with
    ->neigh_cleanup(), which is called when neighbor entry goes to dead
    state. At this point everything is still valid: neigh->dev,
    neigh->parms etc.

    The device should guarantee that dead neighbor entries (neigh->dead !=
    0) do not get private part initialized, otherwise nobody will cleanup
    it.

    I think this is enough for ipoib which is the only user of this thing.
    Initialization private part of neighbor entries happens in ipib
    start_xmit routine, which is not reached when device is down. But it
    would be better to add explicit test for neigh->dead in any case.

    Signed-off-by: David S. Miller

    Alexey Kuznetsov
     

13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

03 Dec, 2006

2 commits


18 Sep, 2006

1 commit


22 Jul, 2006

1 commit


10 Jul, 2006

1 commit

  • This patch fixes the following compile error with CONFIG_PROC_FS=n by
    reverting commit dcdb02752ff13a64433c36f2937a58d93ae7a19e:

    ...
    CC net/atm/clip.o
    net/atm/clip.c: In function ‘atm_clip_init’:
    net/atm/clip.c:975: error: ‘atm_proc_root’ undeclared (first use in this function)
    net/atm/clip.c:975: error: (Each undeclared identifier is reported only once
    net/atm/clip.c:975: error: for each function it appears in.)
    net/atm/clip.c:977: error: ‘arp_seq_fops’ undeclared (first use in this function)
    make[2]: *** [net/atm/clip.o] Error 1

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

04 Jul, 2006

1 commit


01 Jul, 2006

1 commit


18 Jun, 2006

1 commit

  • Various drivers use xmit_lock internally to synchronise with their
    transmission routines. They do so without setting xmit_lock_owner.
    This is fine as long as netpoll is not in use.

    With netpoll it is possible for deadlocks to occur if xmit_lock_owner
    isn't set. This is because if a printk occurs while xmit_lock is held
    and xmit_lock_owner is not set can cause netpoll to attempt to take
    xmit_lock recursively.

    While it is possible to resolve this by getting netpoll to use
    trylock, it is suboptimal because netpoll's sole objective is to
    maximise the chance of getting the printk out on the wire. So
    delaying or dropping the message is to be avoided as much as possible.

    So the only alternative is to always set xmit_lock_owner. The
    following patch does this by introducing the netif_tx_lock family of
    functions that take care of setting/unsetting xmit_lock_owner.

    I renamed xmit_lock to _xmit_lock to indicate that it should not be
    used directly. I didn't provide irq versions of the netif_tx_lock
    functions since xmit_lock is meant to be a BH-disabling lock.

    This is pretty much a straight text substitution except for a small
    bug fix in winbond. It currently uses
    netif_stop_queue/spin_unlock_wait to stop transmission. This is
    unsafe as an IRQ can potentially wake up the queue. So it is safer to
    use netif_tx_disable.

    The hamradio bits used spin_lock_irq but it is unnecessary as
    xmit_lock must never be taken in an IRQ handler.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

13 May, 2006

1 commit

  • The classical IP over ATM code maintains its own IPv4
    ARP table, using the standard neighbour-table code. The
    neigh_table_init function adds this neighbour table to a linked list
    of all neighbor tables which is used by the functions neigh_delete()
    neigh_add() and neightbl_set(), all called by the netlink code.

    Once the ATM neighbour table is added to the list, there are two
    tables with family == AF_INET there, and ARP entries sent via netlink
    go into the first table with matching family. This is indeterminate
    and often wrong.

    To see the bug, on a kernel with CLIP enabled, create a standard IPv4
    ARP entry by pinging an unused address on a local subnet. Then attempt
    to complete that entry by doing

    ip neigh replace lladdr nud reachable

    Looking at the ARP tables by using

    ip neigh show

    will reveal two ARP entries for the same address. One of these can be
    found in /proc/net/arp, and the other in /proc/net/atm/arp.

    This patch adds a new function, neigh_table_init_no_netlink() which
    does everything the neigh_table_init() does, except add the table to
    the netlink all-arp-tables chain. In addition neigh_table_init() has a
    check that all tables on the chain have a distinct address family.
    The init call in clip.c is changed to call
    neigh_table_init_no_netlink().

    Since ATM ARP tables are rather more complicated than can currently be
    handled by the available rtattrs in the netlink protocol, no
    functionality is lost by this patch, and non-ATM ARP manipulation via
    netlink is rescued. A more complete solution would involve a rtattr
    for ATM ARP entries and some way for the netlink code to give
    neigh_add and friends more information than just address family with
    which to find the correct ARP table.

    [ I've changed the assertion checking in neigh_table_init() to not
    use BUG_ON() while holding neigh_tbl_lock. Instead we remember that
    we found an existing tbl with the same family, and after dropping
    the lock we'll give a diagnostic kernel log message and a stack dump.
    -DaveM ]

    Signed-off-by: Simon Kelley
    Signed-off-by: David S. Miller

    Simon Kelley
     

15 Apr, 2006

6 commits


21 Mar, 2006

1 commit


12 Jan, 2006

1 commit


04 Oct, 2005

1 commit

  • The following patch renames __in_dev_get() to __in_dev_get_rtnl() and
    introduces __in_dev_get_rcu() to cover the second case.

    1) RCU with refcnt should use in_dev_get().
    2) RCU without refcnt should use __in_dev_get_rcu().
    3) All others must hold RTNL and use __in_dev_get_rtnl().

    There is one exception in net/ipv4/route.c which is in fact a pre-existing
    race condition. I've marked it as such so that we remember to fix it.

    This patch is based on suggestions and prior work by Suzanne Wood and
    Paul McKenney.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds