24 Jun, 2007

5 commits


23 Jun, 2007

3 commits


19 Jun, 2007

3 commits

  • Return the number of bytes buffered in rxrpc_send_data().

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     
  • ip_vs currently fails to reset its ip_vs_sync_state variable if the
    sync thread fails to start properly. The result is that the kernel
    will report a running daemon when their actuall is none.

    If you issue the following commands:

    1. ipvsadm --start-daemon master --mcast-interface bla
    2. ipvsadm -L --daemon
    3. ipvsadm --stop-daemon master

    Assuming that bla is not an actual interface, step 2 should return no
    data, but instead returns:

    $ ipvsadm -L --daemon
    master sync daemon (mcast=bla, syncid=0)

    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     
  • My IPsec MTU optimization patch introduced a regression in MTU calculation
    for non-ESP SAs, the SA's header_len needs to be subtracted from the MTU if
    the transform doesn't provide a ->get_mtu() function.

    Reported-and-tested-by: Marco Berizzi

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

16 Jun, 2007

3 commits

  • This patch fixes a NULL dereference spotted by the Coverity checker.

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

    Adrian Bunk
     
  • Commit 6f74651ae626ec672028587bc700538076dfbefb is found guilty
    of breaking DSACK counting, which should be done only for the
    SACK block reported by the DSACK instead of every SACK block
    that is received along with DSACK information.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Commit 164891aadf1721fca4dce473bb0e0998181537c6 broke RTT
    sampling of congestion control modules. Inaccurate timestamps
    could be fed to them without providing any way for them to
    identify such cases. Previously RTT sampler was called only if
    FLAG_RETRANS_DATA_ACKED was not set filtering inaccurate
    timestamps nicely. In addition, the new behavior could give an
    invalid timestamp (zero) to RTT sampler if only skbs with
    TCPCB_RETRANS were ACKed. This solves both problems.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     

15 Jun, 2007

3 commits

  • David S. Miller
     
  • The recent patch that added ipv6_hwtype is broken on tuntap tunnels.
    Indeed, it's broken on any device that does not pass the ipv6_hwtype
    test.

    The reason is that the original test only applies to autoconfiguration,
    not IPv6 support. IPv6 support is allowed on any device. In fact,
    even with the ipv6_hwtype patch applied you can still add IPv6 addresses
    to any interface that doesn't pass thw ipv6_hwtype test provided that
    they have a sufficiently large MTU. This is a serious problem because
    come deregistration time these devices won't be cleaned up properly.

    I've gone back and looked at the rationale for the patch. It appears
    that the real problem is that we were creating IPv6 devices even if the
    MTU was too small. So here's a patch which fixes that and reverts the
    ipv6_hwtype stuff.

    Thanks to Kanru Chen for reporting this issue.

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

    Herbert Xu
     
  • This flaw does not affect any behavior (currently).

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     

14 Jun, 2007

6 commits


13 Jun, 2007

4 commits


12 Jun, 2007

3 commits


09 Jun, 2007

5 commits

  • Jean II was right: you have to re-charge the final timer when
    resending rejected frames. Otherwise it triggers at a wrong time and
    can break the currently running communication. Reproducible under
    rt-preempt.

    Signed-off-by: G. Liakhovetski
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    G. Liakhovetski
     
  • From: G. Liakhovetski

    We need to switch to NRM _before_ sending the final packet otherwise
    we might hit a race condition where we get the first packet from the
    peer while we're still in LAP_XMIT_P.

    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    G. Liakhovetski
     
  • IPv4 options are not very well aligned within the packet and the
    format of a CIPSO option is even worse. The result is that the CIPSO
    engine in the kernel does a few unaligned accesses when parsing and
    validating incoming packets with CIPSO options attached which generate
    error messages on certain alignment sensitive platforms. This patch
    fixes this by marking these unaligned accesses with the
    get_unaliagned() macro.

    Signed-off-by: Paul Moore
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Paul Moore
     
  • The current NetLabel code has some redundant APIs which allow both
    "struct socket" and "struct sock" types to be used; this may have made
    sense at some point but it is wasteful now. Remove the functions that
    operate on sockets and convert the callers. Not only does this make
    the code smaller and more consistent but it pushes the locking burden
    up to the caller which can be more intelligent about the locks. Also,
    perform the same conversion (socket to sock) on the SELinux/NetLabel
    glue code where it make sense.

    Signed-off-by: Paul Moore
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Paul Moore
     
  • Now that we create idev before addresses are added, it no longer makes
    sense to remove them when addresses are all deleted.

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

    Herbert Xu
     

08 Jun, 2007

5 commits

  • Currently we check for permission before deleting entries from SAD and
    SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete())
    However we are not checking for authorization when flushing the SPD and
    the SAD completely. It was perhaps missed in the original security hooks
    patch.

    This patch adds a security check when flushing entries from the SAD and
    SPD. It runs the entire database and checks each entry for a denial.
    If the process attempting the flush is unable to remove all of the
    entries a denial is logged the the flush function returns an error
    without removing anything.

    This is particularly useful when a process may need to create or delete
    its own xfrm entries used for things like labeled networking but that
    same process should not be able to delete other entries or flush the
    entire database.

    Signed-off-by: Joy Latten
    Signed-off-by: Eric Paris
    Signed-off-by: James Morris

    Joy Latten
     
  • cbq and atm destroy their filters twice when destroying inner classes
    during qdisc destruction.

    Reported-and-tested-by: Strobl Anton

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • When changing the link state from userspace not affecting any other
    flags. Two duplicate notification are being sent, once as action
    in the NETDEV_UP/NETDEV_DOWN notification chain and a second time
    when comparing old and new device flags after the change has been
    completed. Although harmless, the duplicates should be avoided.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • This reverts changesets:

    6aaf47fa48d3c44280810b1b470261d340e4ed87
    b7b5f487ab39bc10ed0694af35651a03d9cb97ff
    de34ed91c4ffa4727964a832c46e624dd1495cf5
    fc038410b4b1643766f8033f4940bcdb1dace633

    There are still some correctness issues recently
    discovered which do not have a known fix that doesn't
    involve doing a full hash table scan on port bind.

    So revert for now.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • A recv() on an AF_UNIX, SOCK_STREAM socket can race with a
    send()+close() on the peer, causing recv() to return zero, even though
    the sent data should be received.

    This happens if the send() and the close() is performed between
    skb_dequeue() and checking sk->sk_shutdown in unix_stream_recvmsg():

    process A skb_dequeue() returns NULL, there's no data in the socket queue
    process B new data is inserted onto the queue by unix_stream_sendmsg()
    process B sk->sk_shutdown is set to SHUTDOWN_MASK by unix_release_sock()
    process A sk->sk_shutdown is checked, unix_release_sock() returns zero

    I'm surprised nobody noticed this, it's not hard to trigger. Maybe
    it's just (un)luck with the timing.

    It's possible to work around this bug in userspace, by retrying the
    recv() once in case of a zero return value.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: David S. Miller

    Miklos Szeredi