19 Aug, 2010

12 commits

  • This patch removes the abstraction introduced by the union skb_shared_tx in
    the shared skb data.

    The access of the different union elements at several places led to some
    confusion about accessing the shared tx_flags e.g. in skb_orphan_try().

    http://marc.info/?l=linux-netdev&m=128084897415886&w=2

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     
  • Use the current message logging styles.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Use the current logging message styles.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Use the return value provided by register_netdev on error instead of
    using a previously set value.

    Signed-off-by: Tobias Klauser
    Signed-off-by: David S. Miller

    Tobias Klauser
     
  • Use the return value provided by register_netdev on error instead of
    hard setting it to -ENOMEM.

    Signed-off-by: Tobias Klauser
    Signed-off-by: David S. Miller

    Tobias Klauser
     
  • The error code is stored in the variable err, but it is the variable ret
    that is returned instead. So store the error code in ret. Err is then
    useless.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    local idexpression x;
    constant C;
    @@

    if (...) { ...
    x = -C
    ... when != x
    (
    return ;
    |
    return NULL;
    |
    return;
    |
    * return ...;
    )
    }
    //

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

    Julia Lawall
     
  • Error codes are stored in err, but the return value is always 0. Return
    err instead.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    local idexpression x;
    constant C;
    @@

    if (...) { ...
    x = -C
    ... when != x
    (
    return ;
    |
    return NULL;
    |
    return;
    |
    * return ...;
    )
    }
    //

    Signed-off-by: Julia Lawall
    Acked-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • Error codes are stored in err, but the return value is always 0. Return
    err instead.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    local idexpression x;
    constant C;
    @@

    if (...) { ...
    x = -C
    ... when != x
    (
    return ;
    |
    return NULL;
    |
    return;
    |
    * return ...;
    )
    }
    //

    Signed-off-by: Julia Lawall
    Acked-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • On Mon, 2010-08-09 at 17:34 +0200, Dominik Brodowski wrote:
    > look good from a PCMCIA point of view, therefore:
    > Signed-off-by: Dominik Brodowski

    If PCMCIA is still being looked after, then here's
    another for you, maybe for 2.6.37.

    Use the more descriptive logging message styles.

    There are whitespace/indentation errors in the original
    sources that these changes do not modify, so checkpatch
    errors were cheerfully ignored.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • There is no need to check "s". nla_data() doesn't return NULL. Also we
    already dereferenced "s" at this point so it would have oopsed ealier if
    it were NULL.

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

    Dan Carpenter
     
  • Update s2io driver's version to reflect the series of patches.

    Signed-off-by: Jon Mason
    Signed-off-by: David S. Miller

    Jon Mason
     
  • usr_addrs is never referenced outside the initial struct population
    during open, thus making it unnecessary. Remove it, the code that
    references it, and the struct that it is the only user of.

    Signed-off-by: Jon Mason
    Signed-off-by: David S. Miller

    Jon Mason
     

18 Aug, 2010

14 commits

  • These changes may be slightly safer in some instances.

    There are other kzalloc calls with a multiply, but those
    calls are typically "small fixed #" * sizeof(some pointer)"
    and those are not converted.

    Signed-off-by: Joe Perches
    Acked-by: Gertjan van Wingerde
    Acked-by: Luciano Coelho
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Ensure that TIPC does not re-establish communication with a
    neighboring node until it has finished updating all data structures
    containing information about that node to reflect the earlier loss of
    contact. Previously, it was possible for TIPC to perform its purge of
    name table entries relating to the node once contact had already been
    re-established, resulting in the unwanted removal of valid name table
    entries.

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

    Allan Stephens
     
  • Cause a socket whose TIPC_CONN_TIMEOUT option is zero to wait
    indefinitely for a response to a connection request using connect().
    Previously, specifying a timeout of 0 ms resulted in an immediate
    timeout, which was inconsistent with the behavior specified by Posix
    for a socket's receive and send timeout.

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

    Allan Stephens
     
  • Eliminate printing of dashes after name table column headers
    (to adhere more closely to the standard format used in tipc-config),
    and simplify name table display logic using array lookups rather
    than if-then-else logic.

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

    Allan Stephens
     
  • Eliminate unnecessary checking for null node pointer and redundant
    check of second active link array entry.

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

    Allan Stephens
     
  • Remove validation of the per-connection sequence numbers on routable
    connections, since routable connections are not supported by TIPC.

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

    Allan Stephens
     
  • Modify TIPC's broadcast link so that it counts each piece of a
    fragmented message individually, rather than as treating the group
    as a single message. This ensures that proper correlation of sent
    and received traffic can be done when the broadcast link statistics
    are displayed, and is consistent with the way fragments are counted
    by TIPC's unicast links.

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

    Allan Stephens
     
  • Prevent a TIPC node from sending out a LINK_STATE message
    advertising a broadcast message that it is in the process
    of sending, but has not yet actually sent. Previously, it was
    possible for a link timeout to occur in between the time the
    broadcast link updated its "last message sent" counter and the
    time the broadcast message was passed to the broadcast bearer
    for transmission. This ensures that the code which issues
    the LINK_STATE message isn't informed of the new message until
    the broadcast bearer has had a chance to send it.

    Note: The "last message sent" value is stored in the "fsm_msg_count"
    field of the link structure used by the broadcast link. Since the
    broadcast link doesn't utilize the normal link FSM, this field can
    be re-used rather than adding a new field to the broadcast link.

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

    Allan Stephens
     
  • Allow TIPC's broadcast link to continue operation when it is unable
    to send a message to all nodes in the cluster. Previously, the
    broadcast link attempted to put the broadcast pseudo-bearer into a
    blocked state; however, this caused a crash because the associated
    bearer structure is only partially initialized. Further
    investigation has revealed some conceptual problems with blocking
    the pseudo-bearer; consequently, this functionality has been
    disabled for the time being and the undelivered message is
    eventually resent by the broadcast link's existing message
    retransmission mechanism (if possible).

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

    Allan Stephens
     
  • Add a check to tipc_recv_msg() to ensure it discards messages
    arriving on a newly disabled bearer. This is needed to deal with a
    race condition that can arise if the bearer is in the midst of being
    disabled when it receives a message. Performing the check after
    tipc_net_lock has been taken ensures that TIPC's bearers are in a
    stable state while the message is being processed.

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

    Allan Stephens
     
  • Prevent TIPC from incorrectly setting returned flags to poll()
    in the following cases:

    - an unconnected socket no longer indicates that it is always readable

    - an unconnected, connecting, or listening socket no longer indicates
    that it is always writable

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

    Allan Stephens
     
  • Modify TIPC to return EOPNOTSUPP if an application attempts to perform
    a non-blocking connect() operation, which is not supported by TIPC.

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

    Allan Stephens
     
  • Add support for the SO_RCVLOWAT socket option to TIPC's stream socket
    type.

    Signed-off-by: Florian Westphal
    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Florian Westphal
     
  • Moves log buffer cleanup into tipc_core_stop() so that memory allocated
    for the log buffer is freed if tipc_core_start() is unsuccessful.

    Signed-off-by: Anders Kaseorg
    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Anders Kaseorg
     

17 Aug, 2010

14 commits