30 Nov, 2009

1 commit


26 Nov, 2009

1 commit

  • Generated with the following semantic patch

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 == n2
    + net_eq(n1, n2)

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 != n2
    + !net_eq(n1, n2)

    applied over {include,net,drivers/net}.

    Signed-off-by: Octavian Purdila
    Signed-off-by: David S. Miller

    Octavian Purdila
     

06 Nov, 2009

1 commit

  • The generic __sock_create function has a kern argument which allows the
    security system to make decisions based on if a socket is being created by
    the kernel or by userspace. This patch passes that flag to the
    net_proto_family specific create function, so it can do the same thing.

    Signed-off-by: Eric Paris
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Paris
     

01 Oct, 2009

1 commit

  • This provides safety against negative optlen at the type
    level instead of depending upon (sometimes non-trivial)
    checks against this sprinkled all over the the place, in
    each and every implementation.

    Based upon work done by Arjan van de Ven and feedback
    from Linus Torvalds.

    Signed-off-by: David S. Miller

    David S. Miller
     

29 Aug, 2009

1 commit


13 Jul, 2009

1 commit

  • This makes generic netlink network namespace aware. No
    generic netlink families except for the controller family
    are made namespace aware, they need to be checked one by
    one and then set the family->netnsok member to true.

    A new function genlmsg_multicast_netns() is introduced to
    allow sending a multicast message in a given namespace,
    for example when it applies to an object that lives in
    that namespace, a new function genlmsg_multicast_allns()
    to send a message to all network namespaces (for objects
    that do not have an associated netns).

    The function genlmsg_multicast() is changed to multicast
    the message in just init_net, which is currently correct
    for all generic netlink families since they only work in
    init_net right now. Some will later want to work in all
    net namespaces because they do not care about the netns
    at all -- those will have to be converted to use one of
    the new functions genlmsg_multicast_allns() or
    genlmsg_multicast_netns() whenever they are made netns
    aware in some way.

    After this patch families can easily decide whether or
    not they should be available in all net namespaces. Many
    genl families us it for objects not related to networking
    and should therefore be available in all namespaces, but
    that will have to be done on a per family basis.

    Note that this doesn't touch on the checkpoint/restart
    problem where network namespaces could be used, genl
    families and multicast groups are numbered globally and
    I see no easy way of changing that, especially since it
    must be possible to multicast to all network namespaces
    for those families that do not care about netns.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

06 Jul, 2009

1 commit


22 May, 2009

1 commit


18 May, 2009

1 commit


19 Mar, 2009

1 commit


11 Jan, 2009

1 commit

  • ARRAY_SIZE is more concise to use when the size of an array is divided by
    the size of its type or the size of its first element.

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @i@
    @@

    #include

    @depends on i using "paren.iso"@
    type T;
    T[] E;
    @@

    - (sizeof(E)/sizeof(T))
    + ARRAY_SIZE(E)
    //

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

    Julia Lawall
     

08 Nov, 2008

1 commit


28 Oct, 2008

1 commit

  • This converts pretty much everything to print_mac. There were
    a few things that had conflicts which I have just dropped for
    now, no harm done.

    I've built an allyesconfig with this and looked at the files
    that weren't built very carefully, but it's a huge patch.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

03 Sep, 2008

1 commit


13 Aug, 2008

1 commit


20 Jul, 2008

1 commit


15 Jul, 2008

7 commits

  • This patch simplifies and speeds up TIPC's algorithm for identifying
    on-node and off-node destinations that overlap a multicast name
    sequence range. Rather than traversing the list of all known name
    publications within the cluster, it now traverses the (potentially
    much shorter) list of name publications made by the node itself, and
    determines if any off-node destinations exist by comparing the sizes
    of the two lists. (Since the node list must be a subset of the
    cluster list, a difference in sizes means that at least one off-node
    destination must exist.)

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch ensures that TIPC configuration commands that display info
    about neighboring nodes and their links take the spinlocks that
    protect the node list and link lists from changing while the lists
    are being traversed.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch ensures that TIPC's multicast message name lookup
    algorithm does individualized scope checking for each published
    name it examines. Previously, scope checking was only done for
    the first name in a name table publication list, which could
    result in incoming multicast messages being delivered to ports
    publishing names with "node" scope, or not being delivered to
    ports publishing names with "cluster" or "zone" scope.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch corrects many places where TIPC routines indicated
    successful completion by returning TIPC_OK instead of 0.
    (The TIPC_OK symbol has the value 0, but it should only be used
    in contexts that deal with the error code field of a TIPC
    message header.)

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch ensurs that accept() returns successfully even when
    the newly created socket is immediately disconnected by its peer.
    Previously, accept() would fail if it was unable to pass back
    the optional address info for the socket's peer before the
    socket became disconnected; TIPC now allows accept() to gather
    peer address information after disconnection. As a bonus, the
    revised code accesses the socket's port more efficiently, without
    the overhead incurred by a reference table lookup.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch eliminates an unnecessary pointer dereference when
    accessing a stream-based socket's receive queue.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch eliminates an unneeded parameter when creating a low-level
    TIPC port object. Instead of returning both the pointer to the port
    structure and the port's reference ID, it now returns only the pointer
    since the port structure contains the reference ID as one of its fields.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     

05 Jun, 2008

13 commits

  • This patch defines a few new message header manipulation routines,
    and generalizes the usefulness of another, in preparation for upcoming
    rework of TIPC's message rejection code.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch ensures that TIPC doesn't try to access non-existent
    message header fields when rejecting a message with a short header.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch eliminates several cases where message header fields
    were being set to the same value twice.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch increases the "sequence gap" field of the LINK_PROTOCOL
    message header from 8 bits to 13 bits (utilizing 5 previously
    unused 0 bits). This ensures that the field is big enough to
    indicate the loss of up to 8191 consecutive messages on the link,
    thereby accommodating the current worst-case scenario of 4000
    lost messages.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch ensures that the display code that traverses the
    publication lists belonging to a name table entry take its
    associated spinlock, to protect against a possible change to
    one of its "head of list" pointers caused by a simultaneous
    name table lookup operation by another thread of control.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch adds a check to prevent TIPC's name table display code
    from listing a name type entry if it exists only to hold subscription
    info, rather than published names.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch eliminates the rarely-used "error code" argument
    when initializing a TIPC message header, since the default
    value of zero is the desired result in most cases; the few
    exceptional cases now set the error code explicitly.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch eliminates a case where TIPC's link code could try reading
    a field that is not present in a short message header. (The random
    value obtained was not being used, but the read operation could result
    in an invalid memory access exception in extremely rare circumstances.)

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch enhances TIPC's handler for incoming messages in two
    ways:
    - the trivial, single-use routine for processing non-sequenced
    messages has been merged into the main handler
    - the interface that received a message is now identified without
    having to access and/or modify the associated sk_buff

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch introduces a new, out-of-range value to indicate that
    a link endpoint does not have an existing session established
    with its peer, eliminating the risk that the previously used
    "invalid session number" value (i.e. zero) might eventually be
    assigned as a valid session number and cause incorrect link
    behavior.

    The patch also introduces explicit bit masking when assigning a
    new link session number to ensure it does not exceed 16 bits.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch corrects two problems in the display of error code
    information in TIPC messages when debugging:
    - no longer tries to display error code in NAME_DISTRIBUTOR
    messages, which don't have the error field
    - now displays error code in 24 byte data messages, which do
    have the error field

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch re-orders & re-groups the error checks performed on
    messages being delivered to native API ports, in order to clarify the
    similarities and differences required for the various message types.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch fixes a bug that prevented TIPC from receiving a
    connection setup request message on a native TIPC port.
    The revised connection setup logic ensures that validation
    of the source of a connection-based message is skipped if
    the port is not yet connected to a peer.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     

22 May, 2008

4 commits