mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
b786e2b0fa
commit
ec8a2e5621
6 changed files with 19 additions and 55 deletions
|
@ -1416,6 +1416,11 @@ static int filter_rcv(struct sock *sk, struct sk_buff *buf)
|
|||
unsigned int limit = rcvbuf_limit(sk, buf);
|
||||
int rc = TIPC_OK;
|
||||
|
||||
if (unlikely(msg_user(msg) == CONN_MANAGER)) {
|
||||
tipc_port_proto_rcv(&tsk->port, buf);
|
||||
return TIPC_OK;
|
||||
}
|
||||
|
||||
/* Reject message if it is wrong sort of message for socket */
|
||||
if (msg_type(msg) > TIPC_DIRECT_MSG)
|
||||
return -TIPC_ERR_NO_PORT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue