Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicting commits, all resolutions pretty trivial: drivers/bus/mhi/pci_generic.c5c2c853159("bus: mhi: pci-generic: configurable network interface MRU")56f6f4c4eb("bus: mhi: pci_generic: Apply no-op for wake using sideband wake boolean") drivers/nfc/s3fwrn5/firmware.ca0302ff590("nfc: s3fwrn5: remove unnecessary label")46573e3ab0("nfc: s3fwrn5: fix undefined parameter values in dev_err()")801e541c79("nfc: s3fwrn5: fix undefined parameter values in dev_err()") MAINTAINERS7d901a1e87("net: phy: add Maxlinear GPY115/21x/24x driver")8a7b46fa79("MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -158,6 +158,7 @@ static void tipc_sk_remove(struct tipc_sock *tsk);
|
||||
static int __tipc_sendstream(struct socket *sock, struct msghdr *m, size_t dsz);
|
||||
static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz);
|
||||
static void tipc_sk_push_backlog(struct tipc_sock *tsk, bool nagle_ack);
|
||||
static int tipc_wait_for_connect(struct socket *sock, long *timeo_p);
|
||||
|
||||
static const struct proto_ops packet_ops;
|
||||
static const struct proto_ops stream_ops;
|
||||
@@ -1515,8 +1516,13 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen)
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
if (unlikely(syn && !rc))
|
||||
if (unlikely(syn && !rc)) {
|
||||
tipc_set_sk_state(sk, TIPC_CONNECTING);
|
||||
if (timeout) {
|
||||
timeout = msecs_to_jiffies(timeout);
|
||||
tipc_wait_for_connect(sock, &timeout);
|
||||
}
|
||||
}
|
||||
|
||||
return rc ? rc : dlen;
|
||||
}
|
||||
@@ -1564,7 +1570,7 @@ static int __tipc_sendstream(struct socket *sock, struct msghdr *m, size_t dlen)
|
||||
return -EMSGSIZE;
|
||||
|
||||
/* Handle implicit connection setup */
|
||||
if (unlikely(dest)) {
|
||||
if (unlikely(dest && sk->sk_state == TIPC_OPEN)) {
|
||||
rc = __tipc_sendmsg(sock, m, dlen);
|
||||
if (dlen && dlen == rc) {
|
||||
tsk->peer_caps = tipc_node_get_capabilities(net, dnode);
|
||||
@@ -2666,7 +2672,7 @@ static int tipc_listen(struct socket *sock, int len)
|
||||
static int tipc_wait_for_accept(struct socket *sock, long timeo)
|
||||
{
|
||||
struct sock *sk = sock->sk;
|
||||
DEFINE_WAIT(wait);
|
||||
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||||
int err;
|
||||
|
||||
/* True wake-one mechanism for incoming connections: only
|
||||
@@ -2675,12 +2681,12 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo)
|
||||
* anymore, the common case will execute the loop only once.
|
||||
*/
|
||||
for (;;) {
|
||||
prepare_to_wait_exclusive(sk_sleep(sk), &wait,
|
||||
TASK_INTERRUPTIBLE);
|
||||
if (timeo && skb_queue_empty(&sk->sk_receive_queue)) {
|
||||
add_wait_queue(sk_sleep(sk), &wait);
|
||||
release_sock(sk);
|
||||
timeo = schedule_timeout(timeo);
|
||||
timeo = wait_woken(&wait, TASK_INTERRUPTIBLE, timeo);
|
||||
lock_sock(sk);
|
||||
remove_wait_queue(sk_sleep(sk), &wait);
|
||||
}
|
||||
err = 0;
|
||||
if (!skb_queue_empty(&sk->sk_receive_queue))
|
||||
@@ -2692,7 +2698,6 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo)
|
||||
if (signal_pending(current))
|
||||
break;
|
||||
}
|
||||
finish_wait(sk_sleep(sk), &wait);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -2709,9 +2714,10 @@ static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags,
|
||||
bool kern)
|
||||
{
|
||||
struct sock *new_sk, *sk = sock->sk;
|
||||
struct sk_buff *buf;
|
||||
struct tipc_sock *new_tsock;
|
||||
struct msghdr m = {NULL,};
|
||||
struct tipc_msg *msg;
|
||||
struct sk_buff *buf;
|
||||
long timeo;
|
||||
int res;
|
||||
|
||||
@@ -2757,19 +2763,17 @@ static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags,
|
||||
}
|
||||
|
||||
/*
|
||||
* Respond to 'SYN-' by discarding it & returning 'ACK'-.
|
||||
* Respond to 'SYN+' by queuing it on new socket.
|
||||
* Respond to 'SYN-' by discarding it & returning 'ACK'.
|
||||
* Respond to 'SYN+' by queuing it on new socket & returning 'ACK'.
|
||||
*/
|
||||
if (!msg_data_sz(msg)) {
|
||||
struct msghdr m = {NULL,};
|
||||
|
||||
tsk_advance_rx_queue(sk);
|
||||
__tipc_sendstream(new_sock, &m, 0);
|
||||
} else {
|
||||
__skb_dequeue(&sk->sk_receive_queue);
|
||||
__skb_queue_head(&new_sk->sk_receive_queue, buf);
|
||||
skb_set_owner_r(buf, new_sk);
|
||||
}
|
||||
__tipc_sendstream(new_sock, &m, 0);
|
||||
release_sock(new_sk);
|
||||
exit:
|
||||
release_sock(sk);
|
||||
|
||||
Reference in New Issue
Block a user