1. 22 Jun, 2016 6 commits
    • David Howells's avatar
      rxrpc: Pass sk_buff * rather than rxrpc_host_header * to functions · 42886ffe
      David Howells authored
      Pass a pointer to struct sk_buff rather than struct rxrpc_host_header to
      functions so that they can in the future get at transport protocol parameters
      rather than just RxRPC parameters.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      42886ffe
    • David Howells's avatar
      rxrpc: Fix exclusive connection handling · cc8feb8e
      David Howells authored
      "Exclusive connections" are meant to be used for a single client call and
      then scrapped.  The idea is to limit the use of the negotiated security
      context.  The current code, however, isn't doing this: it is instead
      restricting the socket to a single virtual connection and doing all the
      calls over that.
      
      This is changed such that the socket no longer maintains a special virtual
      connection over which it will do all the calls, but rather gets a new one
      each time a new exclusive call is made.
      
      Further, using a socket option for this is a poor choice.  It should be
      done on sendmsg with a control message marker instead so that calls can be
      marked exclusive individually.  To that end, add RXRPC_EXCLUSIVE_CALL
      which, if passed to sendmsg() as a control message element, will cause the
      call to be done on an single-use connection.
      
      The socket option (RXRPC_EXCLUSIVE_CONNECTION) still exists and, if set,
      will override any lack of RXRPC_EXCLUSIVE_CALL being specified so that
      programs using the setsockopt() will appear to work the same.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc8feb8e
    • David Howells's avatar
      rxrpc: Replace conn->trans->{local,peer} with conn->params.{local,peer} · 85f32278
      David Howells authored
      Replace accesses of conn->trans->{local,peer} with
      conn->params.{local,peer} thus making it easier for a future commit to
      remove the rxrpc_transport struct.
      
      This also reduces the number of memory accesses involved.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      85f32278
    • David Howells's avatar
      rxrpc: Use structs to hold connection params and protocol info · 19ffa01c
      David Howells authored
      Define and use a structure to hold connection parameters.  This makes it
      easier to pass multiple connection parameters around.
      
      Define and use a structure to hold protocol information used to hash a
      connection for lookup on incoming packet.  Most of these fields will be
      disposed of eventually, including the duplicate local pointer.
      
      Whilst we're at it rename "proto" to "family" when referring to a protocol
      family.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      19ffa01c
    • Arnd Bergmann's avatar
      rxrpc: fix uninitialized variable use · 2f9f9f52
      Arnd Bergmann authored
      Hashing the peer key was introduced for AF_INET, but gcc
      warns about the rxrpc_peer_hash_key function returning uninitialized
      data for any other value of srx->transport.family:
      
      net/rxrpc/peer_object.c: In function 'rxrpc_peer_hash_key':
      net/rxrpc/peer_object.c:57:15: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      Assuming that nothing else can be set here, this changes the
      function to just return zero in case of an unknown address
      family.
      
      Fixes: be6e6707 ("rxrpc: Rework peer object handling to use hash table and RCU")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      2f9f9f52
    • Dan Carpenter's avatar
      rxrpc: checking for IS_ERR() instead of NULL · 0e4699e4
      Dan Carpenter authored
      rxrpc_lookup_peer_rcu() and rxrpc_lookup_peer() return NULL on error, never
      error pointers, so IS_ERR() can't be used.
      
      Fix three callers of those functions.
      
      Fixes: be6e6707 ('rxrpc: Rework peer object handling to use hash table and RCU')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0e4699e4
  2. 21 Jun, 2016 34 commits