diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2014-06-25 21:41:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-27 15:50:56 -0400 |
commit | ec8a2e5621db2da24badb3969eda7fd359e1869f (patch) | |
tree | c169c9e1d7d043ff5c73c3c4ccdcf09702d4f69a /net/tipc/socket.c | |
parent | b786e2b0faea1265d72533d59ec4482f764ad60f (diff) |
tipc: same receive code path for connection protocol and data messages
As a preparation to eliminate port_lock we need to bring reception
of connection protocol messages under proper protection of bh_lock_sock
or socket owner.
We fix this by letting those messages follow the same code path as
incoming data messages.
As a side effect of this change, the last reference to the function
net_route_msg() disappears, and we can eliminate that function.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index bfe79bbd83a1..d838a4b66d3a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -1416,6 +1416,11 @@ static int filter_rcv(struct sock *sk, struct sk_buff *buf) | |||
1416 | unsigned int limit = rcvbuf_limit(sk, buf); | 1416 | unsigned int limit = rcvbuf_limit(sk, buf); |
1417 | int rc = TIPC_OK; | 1417 | int rc = TIPC_OK; |
1418 | 1418 | ||
1419 | if (unlikely(msg_user(msg) == CONN_MANAGER)) { | ||
1420 | tipc_port_proto_rcv(&tsk->port, buf); | ||
1421 | return TIPC_OK; | ||
1422 | } | ||
1423 | |||
1419 | /* Reject message if it is wrong sort of message for socket */ | 1424 | /* Reject message if it is wrong sort of message for socket */ |
1420 | if (msg_type(msg) > TIPC_DIRECT_MSG) | 1425 | if (msg_type(msg) > TIPC_DIRECT_MSG) |
1421 | return -TIPC_ERR_NO_PORT; | 1426 | return -TIPC_ERR_NO_PORT; |