* [PATCH net-next 5/5] tipc: standardize recvmsg routine
From: Ying Xue @ 2014-01-17 1:50 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, Paul.Gortmaker, tipc-discussion
In-Reply-To: <1389923407-26969-1-git-send-email-ying.xue@windriver.com>
Standardize the behaviour of waiting for events in TIPC recvmsg()
so that all variables of socket or port structures are protected
within socket lock, allowing the process of calling recvmsg() to
be woken up at appropriate time.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/socket.c | 80 ++++++++++++++++++++++++++++-------------------------
1 file changed, 42 insertions(+), 38 deletions(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c480310..eab17eb 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -55,9 +55,6 @@ struct tipc_sock {
#define tipc_sk(sk) ((struct tipc_sock *)(sk))
#define tipc_sk_port(sk) (tipc_sk(sk)->p)
-#define tipc_rx_ready(sock) (!skb_queue_empty(&sock->sk->sk_receive_queue) || \
- (sock->state == SS_DISCONNECTING))
-
static int backlog_rcv(struct sock *sk, struct sk_buff *skb);
static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf);
static void wakeupdispatch(struct tipc_port *tport);
@@ -994,6 +991,37 @@ static int anc_data_recv(struct msghdr *m, struct tipc_msg *msg,
return 0;
}
+static int tipc_wait_for_rcvmsg(struct socket *sock, long timeo)
+{
+ struct sock *sk = sock->sk;
+ DEFINE_WAIT(wait);
+ int err;
+
+ for (;;) {
+ prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
+ if (skb_queue_empty(&sk->sk_receive_queue)) {
+ if (sock->state == SS_DISCONNECTING) {
+ err = -ENOTCONN;
+ break;
+ }
+ release_sock(sk);
+ timeo = schedule_timeout(timeo);
+ lock_sock(sk);
+ }
+ err = 0;
+ if (!skb_queue_empty(&sk->sk_receive_queue))
+ break;
+ err = sock_intr_errno(timeo);
+ if (signal_pending(current))
+ break;
+ err = -EAGAIN;
+ if (!timeo)
+ break;
+ }
+ finish_wait(sk_sleep(sk), &wait);
+ return err;
+}
+
/**
* recv_msg - receive packet-oriented message
* @iocb: (unused)
@@ -1013,7 +1041,7 @@ static int recv_msg(struct kiocb *iocb, struct socket *sock,
struct tipc_port *tport = tipc_sk_port(sk);
struct sk_buff *buf;
struct tipc_msg *msg;
- long timeout;
+ long timeo;
unsigned int sz;
u32 err;
int res;
@@ -1029,25 +1057,13 @@ static int recv_msg(struct kiocb *iocb, struct socket *sock,
goto exit;
}
- timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
+ timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
restart:
/* Look for a message in receive queue; wait if necessary */
- while (skb_queue_empty(&sk->sk_receive_queue)) {
- if (sock->state == SS_DISCONNECTING) {
- res = -ENOTCONN;
- goto exit;
- }
- if (timeout <= 0L) {
- res = timeout ? timeout : -EWOULDBLOCK;
- goto exit;
- }
- release_sock(sk);
- timeout = wait_event_interruptible_timeout(*sk_sleep(sk),
- tipc_rx_ready(sock),
- timeout);
- lock_sock(sk);
- }
+ res = tipc_wait_for_rcvmsg(sock, timeo);
+ if (res)
+ goto exit;
/* Look at first message in receive queue */
buf = skb_peek(&sk->sk_receive_queue);
@@ -1119,7 +1135,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock,
struct tipc_port *tport = tipc_sk_port(sk);
struct sk_buff *buf;
struct tipc_msg *msg;
- long timeout;
+ long timeo;
unsigned int sz;
int sz_to_copy, target, needed;
int sz_copied = 0;
@@ -1132,31 +1148,19 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock,
lock_sock(sk);
- if (unlikely((sock->state == SS_UNCONNECTED))) {
+ if (unlikely(sock->state == SS_UNCONNECTED)) {
res = -ENOTCONN;
goto exit;
}
target = sock_rcvlowat(sk, flags & MSG_WAITALL, buf_len);
- timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
+ timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
restart:
/* Look for a message in receive queue; wait if necessary */
- while (skb_queue_empty(&sk->sk_receive_queue)) {
- if (sock->state == SS_DISCONNECTING) {
- res = -ENOTCONN;
- goto exit;
- }
- if (timeout <= 0L) {
- res = timeout ? timeout : -EWOULDBLOCK;
- goto exit;
- }
- release_sock(sk);
- timeout = wait_event_interruptible_timeout(*sk_sleep(sk),
- tipc_rx_ready(sock),
- timeout);
- lock_sock(sk);
- }
+ res = tipc_wait_for_rcvmsg(sock, timeo);
+ if (res)
+ goto exit;
/* Look at first message in receive queue */
buf = skb_peek(&sk->sk_receive_queue);
--
1.7.9.5
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 4/5] tipc: standardize sendmsg routine of connected socket
From: Ying Xue @ 2014-01-17 1:50 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, Paul.Gortmaker, tipc-discussion
In-Reply-To: <1389923407-26969-1-git-send-email-ying.xue@windriver.com>
Standardize the behaviour of waiting for events in TIPC send_packet()
so that all variables of socket or port structures are protected within
socket lock, allowing the process of calling sendmsg() to be woken up
at appropriate time.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/socket.c | 60 ++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 41 insertions(+), 19 deletions(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 3e01973..c480310 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -695,6 +695,34 @@ exit:
return res;
}
+static int tipc_wait_for_sndpkt(struct socket *sock, long *timeo_p)
+{
+ struct sock *sk = sock->sk;
+ struct tipc_port *tport = tipc_sk_port(sk);
+ DEFINE_WAIT(wait);
+ int done;
+
+ do {
+ int err = sock_error(sk);
+ if (err)
+ return err;
+ if (sock->state == SS_DISCONNECTING)
+ return -EPIPE;
+ else if (sock->state != SS_CONNECTED)
+ return -ENOTCONN;
+ if (!*timeo_p)
+ return -EAGAIN;
+ if (signal_pending(current))
+ return sock_intr_errno(*timeo_p);
+
+ prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
+ done = sk_wait_event(sk, timeo_p,
+ (!tport->congested || !tport->connected));
+ finish_wait(sk_sleep(sk), &wait);
+ } while (!done);
+ return 0;
+}
+
/**
* send_packet - send a connection-oriented message
* @iocb: if NULL, indicates that socket lock is already held
@@ -712,8 +740,8 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
struct sock *sk = sock->sk;
struct tipc_port *tport = tipc_sk_port(sk);
struct sockaddr_tipc *dest = (struct sockaddr_tipc *)m->msg_name;
- long timeout_val;
- int res;
+ int res = -EINVAL;
+ long timeo;
/* Handle implied connection establishment */
if (unlikely(dest))
@@ -725,30 +753,24 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
if (iocb)
lock_sock(sk);
- timeout_val = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
+ if (unlikely(sock->state != SS_CONNECTED)) {
+ if (sock->state == SS_DISCONNECTING)
+ res = -EPIPE;
+ else
+ res = -ENOTCONN;
+ goto exit;
+ }
+ timeo = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
do {
- if (unlikely(sock->state != SS_CONNECTED)) {
- if (sock->state == SS_DISCONNECTING)
- res = -EPIPE;
- else
- res = -ENOTCONN;
- break;
- }
-
res = tipc_send(tport->ref, m->msg_iov, total_len);
if (likely(res != -ELINKCONG))
break;
- if (timeout_val <= 0L) {
- res = timeout_val ? timeout_val : -EWOULDBLOCK;
+ res = tipc_wait_for_sndpkt(sock, &timeo);
+ if (res)
break;
- }
- release_sock(sk);
- timeout_val = wait_event_interruptible_timeout(*sk_sleep(sk),
- (!tport->congested || !tport->connected), timeout_val);
- lock_sock(sk);
} while (1);
-
+exit:
if (iocb)
release_sock(sk);
return res;
--
1.7.9.5
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 3/5] tipc: standardize sendmsg routine of connectionless socket
From: Ying Xue @ 2014-01-17 1:50 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, Paul.Gortmaker, tipc-discussion
In-Reply-To: <1389923407-26969-1-git-send-email-ying.xue@windriver.com>
Comparing the behaviour of how to wait for events in TIPC sendmsg()
with other stacks, the TIPC implementation might be perceived as
different, and sometimes even incorrect. For instance, sk_sleep()
and tport->congested variables associated with socket are exposed
without socket lock protection while wait_event_interruptible_timeout()
accesses them. So standardizing it with similar implementation
in other stacks can help us correct these errors which the process
of calling sendmsg() cannot be woken up event if an expected event
arrive at socket or improperly woken up although the wake condition
doesn't match.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/socket.c | 39 +++++++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 10 deletions(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 008f6fd..3e01973 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -567,6 +567,31 @@ static int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m)
return 0;
}
+static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p)
+{
+ struct sock *sk = sock->sk;
+ struct tipc_port *tport = tipc_sk_port(sk);
+ DEFINE_WAIT(wait);
+ int done;
+
+ do {
+ int err = sock_error(sk);
+ if (err)
+ return err;
+ if (sock->state == SS_DISCONNECTING)
+ return -EPIPE;
+ if (!*timeo_p)
+ return -EAGAIN;
+ if (signal_pending(current))
+ return sock_intr_errno(*timeo_p);
+
+ prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
+ done = sk_wait_event(sk, timeo_p, !tport->congested);
+ finish_wait(sk_sleep(sk), &wait);
+ } while (!done);
+ return 0;
+}
+
/**
* send_msg - send message in connectionless manner
* @iocb: if NULL, indicates that socket lock is already held
@@ -588,7 +613,7 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
struct tipc_port *tport = tipc_sk_port(sk);
struct sockaddr_tipc *dest = (struct sockaddr_tipc *)m->msg_name;
int needs_conn;
- long timeout_val;
+ long timeo;
int res = -EINVAL;
if (unlikely(!dest))
@@ -625,8 +650,7 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
reject_rx_queue(sk);
}
- timeout_val = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
-
+ timeo = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
do {
if (dest->addrtype == TIPC_ADDR_NAME) {
res = dest_name_check(dest, m);
@@ -660,14 +684,9 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
sock->state = SS_CONNECTING;
break;
}
- if (timeout_val <= 0L) {
- res = timeout_val ? timeout_val : -EWOULDBLOCK;
+ res = tipc_wait_for_sndmsg(sock, &timeo);
+ if (res)
break;
- }
- release_sock(sk);
- timeout_val = wait_event_interruptible_timeout(*sk_sleep(sk),
- !tport->congested, timeout_val);
- lock_sock(sk);
} while (1);
exit:
--
1.7.9.5
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 2/5] tipc: standardize accept routine
From: Ying Xue @ 2014-01-17 1:50 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, Paul.Gortmaker, tipc-discussion
In-Reply-To: <1389923407-26969-1-git-send-email-ying.xue@windriver.com>
Comparing the behaviour of how to wait for events in TIPC accept()
with other stacks, the TIPC implementation might be perceived as
different, and sometimes even incorrect. As sk_sleep() and
sk->sk_receive_queue variables associated with socket are not
protected by socket lock, the process of calling accept() may be
woken up improperly or sometimes cannot be woken up at all. After
standardizing it with inet_csk_wait_for_connect routine, we can
get benefits including: avoiding 'thundering herd' phenomenon,
adding a timeout mechanism for accept(), coping with a pending
signal, and having sk_sleep() and sk->sk_receive_queue being
always protected within socket lock scope and so on.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/socket.c | 54 ++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 41 insertions(+), 13 deletions(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index b2ae25a..008f6fd 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1566,6 +1566,42 @@ static int listen(struct socket *sock, int len)
return res;
}
+static int tipc_wait_for_accept(struct socket *sock, long timeo)
+{
+ struct sock *sk = sock->sk;
+ DEFINE_WAIT(wait);
+ int err;
+
+ /* True wake-one mechanism for incoming connections: only
+ * one process gets woken up, not the 'whole herd'.
+ * Since we do not 'race & poll' for established sockets
+ * anymore, the common case will execute the loop only once.
+ */
+ for (;;) {
+ prepare_to_wait_exclusive(sk_sleep(sk), &wait,
+ TASK_INTERRUPTIBLE);
+ if (skb_queue_empty(&sk->sk_receive_queue)) {
+ release_sock(sk);
+ timeo = schedule_timeout(timeo);
+ lock_sock(sk);
+ }
+ err = 0;
+ if (!skb_queue_empty(&sk->sk_receive_queue))
+ break;
+ err = -EINVAL;
+ if (sock->state != SS_LISTENING)
+ break;
+ err = sock_intr_errno(timeo);
+ if (signal_pending(current))
+ break;
+ err = -EAGAIN;
+ if (!timeo)
+ break;
+ }
+ finish_wait(sk_sleep(sk), &wait);
+ return err;
+}
+
/**
* accept - wait for connection request
* @sock: listening socket
@@ -1582,7 +1618,7 @@ static int accept(struct socket *sock, struct socket *new_sock, int flags)
struct tipc_port *new_tport;
struct tipc_msg *msg;
u32 new_ref;
-
+ long timeo;
int res;
lock_sock(sk);
@@ -1592,18 +1628,10 @@ static int accept(struct socket *sock, struct socket *new_sock, int flags)
goto exit;
}
- while (skb_queue_empty(&sk->sk_receive_queue)) {
- if (flags & O_NONBLOCK) {
- res = -EWOULDBLOCK;
- goto exit;
- }
- release_sock(sk);
- res = wait_event_interruptible(*sk_sleep(sk),
- (!skb_queue_empty(&sk->sk_receive_queue)));
- lock_sock(sk);
- if (res)
- goto exit;
- }
+ timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
+ res = tipc_wait_for_accept(sock, timeo);
+ if (res)
+ goto exit;
buf = skb_peek(&sk->sk_receive_queue);
--
1.7.9.5
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 1/5] tipc: standardize connect routine
From: Ying Xue @ 2014-01-17 1:50 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, Paul.Gortmaker, tipc-discussion
In-Reply-To: <1389923407-26969-1-git-send-email-ying.xue@windriver.com>
Comparing the behaviour of how to wait for events in TIPC connect()
with other stacks, the TIPC implementation might be perceived as
different, and sometimes even incorrect. For instance, as both
sock->state and sk_sleep() are directly fed to
wait_event_interruptible_timeout() as its arguments, and socket lock
has to be released before we call wait_event_interruptible_timeout(),
the two variables associated with socket are exposed out of socket
lock protection, thereby probably getting stale values so that the
process of calling connect() cannot be woken up exactly even if
correct event arrives or it is woken up improperly even if the wake
condition is not satisfied in practice. Therefore, standardizing its
behaviour with sk_stream_wait_connect routine can avoid these risks.
Additionally the implementation of connect routine is simplified as a
whole, allowing it to return correct values in all different cases.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/socket.c | 63 ++++++++++++++++++++++++++++-------------------------
1 file changed, 33 insertions(+), 30 deletions(-)
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c8341d1..b2ae25a 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1438,6 +1438,28 @@ static void wakeupdispatch(struct tipc_port *tport)
sk->sk_write_space(sk);
}
+static int tipc_wait_for_connect(struct socket *sock, long *timeo_p)
+{
+ struct sock *sk = sock->sk;
+ DEFINE_WAIT(wait);
+ int done;
+
+ do {
+ int err = sock_error(sk);
+ if (err)
+ return err;
+ if (!*timeo_p)
+ return -ETIMEDOUT;
+ if (signal_pending(current))
+ return sock_intr_errno(*timeo_p);
+
+ prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
+ done = sk_wait_event(sk, timeo_p, sock->state != SS_CONNECTING);
+ finish_wait(sk_sleep(sk), &wait);
+ } while (!done);
+ return 0;
+}
+
/**
* connect - establish a connection to another TIPC port
* @sock: socket structure
@@ -1453,7 +1475,8 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
struct sock *sk = sock->sk;
struct sockaddr_tipc *dst = (struct sockaddr_tipc *)dest;
struct msghdr m = {NULL,};
- unsigned int timeout;
+ long timeout = (flags & O_NONBLOCK) ? 0 : tipc_sk(sk)->conn_timeout;
+ socket_state previous;
int res;
lock_sock(sk);
@@ -1475,8 +1498,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
goto exit;
}
- timeout = (flags & O_NONBLOCK) ? 0 : tipc_sk(sk)->conn_timeout;
-
+ previous = sock->state;
switch (sock->state) {
case SS_UNCONNECTED:
/* Send a 'SYN-' to destination */
@@ -1498,41 +1520,22 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
* case is EINPROGRESS, rather than EALREADY.
*/
res = -EINPROGRESS;
- break;
case SS_CONNECTING:
- res = -EALREADY;
+ if (previous == SS_CONNECTING)
+ res = -EALREADY;
+ if (!timeout)
+ goto exit;
+ timeout = msecs_to_jiffies(timeout);
+ /* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */
+ res = tipc_wait_for_connect(sock, &timeout);
break;
case SS_CONNECTED:
res = -EISCONN;
break;
default:
res = -EINVAL;
- goto exit;
- }
-
- if (sock->state == SS_CONNECTING) {
- if (!timeout)
- goto exit;
-
- /* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */
- release_sock(sk);
- res = wait_event_interruptible_timeout(*sk_sleep(sk),
- sock->state != SS_CONNECTING,
- timeout ? (long)msecs_to_jiffies(timeout)
- : MAX_SCHEDULE_TIMEOUT);
- if (res <= 0) {
- if (res == 0)
- res = -ETIMEDOUT;
- return res;
- }
- lock_sock(sk);
+ break;
}
-
- if (unlikely(sock->state == SS_DISCONNECTING))
- res = sock_error(sk);
- else
- res = 0;
-
exit:
release_sock(sk);
return res;
--
1.7.9.5
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 0/5] tipc: align TIPC behaviours of waiting for events with other stacks
From: Ying Xue @ 2014-01-17 1:50 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, Paul.Gortmaker, tipc-discussion
Comparing the current implementations of waiting for events in TIPC
socket layer with other stacks, TIPC's behaviour is very different
because wait_event_interruptible_timeout()/wait_event_interruptible()
are always used by TIPC to wait for events while relevant socket or
port variables are fed to them as their arguments. As socket lock has
to be released temporarily before the two routines of waiting for
events are called, their arguments associated with socket or port
structures are out of socket lock protection. This might cause
serious issues where the process of calling socket syscall such as
sendsmg(), connect(), accept(), and recvmsg(), cannot be waken up
at all even if proper event arrives or improperly be woken up
although the condition of waking up the process is not satisfied
in practice.
Therefore, aligning its behaviours with similar functions implemented
in other stacks, for instance, sk_stream_wait_connect() and
inet_csk_wait_for_connect() etc, can avoid above risks for us.
Ying Xue (5):
tipc: standardize connect routine
tipc: standardize accept routine
tipc: standardize sendmsg routine of connectionless socket
tipc: standardize sendmsg routine of connected socket
tipc: standardize recvmsg routine
net/tipc/socket.c | 296 +++++++++++++++++++++++++++++++++--------------------
1 file changed, 186 insertions(+), 110 deletions(-)
--
1.7.9.5
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
^ permalink raw reply
* Re: [PATCH] net: fix "queues" uevent between network namespaces
From: chenweilong @ 2014-01-17 1:47 UTC (permalink / raw)
To: Greg KH; +Cc: davem, netdev
In-Reply-To: <20140116161912.GB7476@kroah.com>
On 2014/1/17 0:19, Greg KH wrote:
> On Thu, Jan 16, 2014 at 05:24:31PM +0800, Chen Weilong wrote:
>> From: Weilong Chen <chenweilong@huawei.com>
>>
>> When I create a new namespace with 'ip netns add net0', or add/remove
>> new links in a namespace with 'ip link add/delete type veth', rx/tx
>> queues events can be got in all namespaces. That is because rx/tx queue
>> ktypes do not have namespace support, and their kobj parents are setted to
>> NULL. This patch is to fix it.
>>
>> Reported-by: Libo Chen <chenlibo@huawei.com>
>> Signed-off-by: Libo Chen <chenlibo@huawei.com>
>> Signed-off-by: Weilong Chen <chenweilong@huawei.com>
>> ---
>> lib/kobject_uevent.c | 10 ++++++++--
>> net/core/net-sysfs.c | 26 ++++++++++++++++++++++++++
>> 2 files changed, 34 insertions(+), 2 deletions(-)
>
> I can't test this, but it looks good to me:
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
>
Hi,
Here's detail about the test, I hope it can be useful:
step1: create two netns
suse11-sp3:~ # ip netns add net0
suse11-sp3:~ # ip netns add net1
suse11-sp3:~ # ip netns list
net1
net0
setp2: monitor udev events
Term1:
suse11-sp3:~ # ip netns exec net0 udevadm monitor
Term2:
suse11-sp3:~ # ip netns exec net1 udevadm monitor
setp3: add link to net0
suse11-sp3:~ # ip netns exec net0 ip link add type veth
Then you'll see the below events in net0 and net1.
KERNEL[1389972662.984988] add /devices/virtual/net/veth0/queues/rx-0 (queues)
KERNEL[1389972662.985008] add /devices/virtual/net/veth0/queues/tx-0 (queues)
KERNEL[1389972662.985234] add /devices/virtual/net/veth1/queues/rx-0 (queues)
KERNEL[1389972662.985247] add /devices/virtual/net/veth1/queues/tx-0 (queues)
^ permalink raw reply
* Re: [PATCH net-next] ipv4: fix a dst leak in tunnels
From: David Miller @ 2014-01-17 1:40 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, therbert, maze, cwang
In-Reply-To: <1389922350.31367.447.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 16 Jan 2014 17:32:30 -0800
> On Thu, 2014-01-16 at 17:13 -0800, David Miller wrote:
>
>> Why do we have to handle DST_NOCACHE specially? We hold a reference
>> and dst_release() knows what to do with DST_NOCACHE routes.
>>
>> Or is it semantically undesirable for tunnels to cache these routes?
>> If so, why do we leave sockets caching DST_NOCACHE routes just fine?
>
> If DST_NOCACHE is set on a dst, this dst cannot be used by rcu users,
> because dst_release() will immediately free the dst, without rcu grace
> period.
Ok, if we ever start using DST_NOCACHE in ipv6 we will have to modify
ipv6 tunnels as they cache similarly.
^ permalink raw reply
* Re: [PATCH net-next] sctp: remove the unnecessary assignment
From: David Miller @ 2014-01-17 1:37 UTC (permalink / raw)
To: wangweidong1; +Cc: nhorman, vyasevich, netdev, linux-sctp
In-Reply-To: <52D7976F.7070708@huawei.com>
From: Wang Weidong <wangweidong1@huawei.com>
Date: Thu, 16 Jan 2014 16:25:19 +0800
> When go the right path, the status is 0, no need to assign it again.
> So just remove the assignment.
>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH net-next] virtio-net: drop rq->max and rq->num
From: David Miller @ 2014-01-17 1:37 UTC (permalink / raw)
To: jasowang; +Cc: netdev, mst, linux-kernel, virtualization
In-Reply-To: <1389854724-48411-1-git-send-email-jasowang@redhat.com>
From: Jason Wang <jasowang@redhat.com>
Date: Thu, 16 Jan 2014 14:45:24 +0800
> It looks like there's no need for those two fields:
>
> - Unless there's a failure for the first refill try, rq->max should be always
> equal to the vring size.
> - rq->num is only used to determine the condition that we need to do the refill,
> we could check vq->num_free instead.
> - rq->num was required to be increased or decreased explicitly after each
> get/put which results a bad API.
>
> So this patch removes them both to make the code simpler.
>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] ipv4: fix a dst leak in tunnels
From: Eric Dumazet @ 2014-01-17 1:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev, therbert, maze, cwang
In-Reply-To: <20140116.171303.2113967209121208034.davem@davemloft.net>
On Thu, 2014-01-16 at 17:13 -0800, David Miller wrote:
> Why do we have to handle DST_NOCACHE specially? We hold a reference
> and dst_release() knows what to do with DST_NOCACHE routes.
>
> Or is it semantically undesirable for tunnels to cache these routes?
> If so, why do we leave sockets caching DST_NOCACHE routes just fine?
If DST_NOCACHE is set on a dst, this dst cannot be used by rcu users,
because dst_release() will immediately free the dst, without rcu grace
period.
^ permalink raw reply
* Re: [PATCH] net: davinci_mdio: Fix sparse warning
From: David Miller @ 2014-01-17 1:30 UTC (permalink / raw)
To: prabhakar.csengg; +Cc: netdev, linux-kernel, mugunthanvnm
In-Reply-To: <1389852341-15393-1-git-send-email-prabhakar.csengg@gmail.com>
From: Prabhakar Lad <prabhakar.csengg@gmail.com>
Date: Thu, 16 Jan 2014 11:35:41 +0530
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> This patch fixes following sparse warning
> davinci_mdio.c:85:27: warning: symbol 'default_pdata' was not declared. Should it be static?
> Also makes the default_pdata as a constant.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] ipv4: fix a dst leak in tunnels
From: Eric Dumazet @ 2014-01-17 1:29 UTC (permalink / raw)
To: David Miller; +Cc: netdev, therbert, maze, cwang
In-Reply-To: <20140116.171303.2113967209121208034.davem@davemloft.net>
On Thu, 2014-01-16 at 17:13 -0800, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 16 Jan 2014 16:41:19 -0800
>
> > This patch :
> >
> > 1) Remove a dst leak if DST_NOCACHE was set on dst
> > Fix this by holding a reference only if dst really cached.
>
> Can you explain this problem a little bit more?
>
> Why do we have to handle DST_NOCACHE specially? We hold a reference
> and dst_release() knows what to do with DST_NOCACHE routes.
>
> Or is it semantically undesirable for tunnels to cache these routes?
> If so, why do we leave sockets caching DST_NOCACHE routes just fine?
Previous code was doing in the callers of __tunnel_dst_set() a
dst_clone(dst)
Then, we were doing in __tunnel_dst_set() :
if (dst && (dst->flags & DST_NOCACHE))
dst = NULL;
When setting dst to NULL here, we forgot to release the reference we
took in callers.
After my patch, we instead do the dst_clone(dst) only in the case we are
not clearing dst :
+ if (dst) {
+ if (dst->flags & DST_NOCACHE)
+ dst = NULL;
+ else
+ dst_clone(dst);
+ }
^ permalink raw reply
* Re: [PATCH v4 net-next] bonding: handle slave's name change with primary_slave logic
From: David Miller @ 2014-01-17 1:27 UTC (permalink / raw)
To: vfalico; +Cc: netdev, dingtianhong, fubar, andy
In-Reply-To: <1389834269-4740-1-git-send-email-vfalico@redhat.com>
From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 16 Jan 2014 02:04:29 +0100
> Currently, if a slave's name change, we just pass it by. However, if the
> slave is a current primary_slave, then we end up with using a slave, whose
> name != params.primary, for primary_slave. And vice-versa, if we don't have
> a primary_slave but have params.primary set - we will not detected a new
> primary_slave.
>
> Fix this by catching the NETDEV_CHANGENAME event and setting primary_slave
> accordingly. Also, if the primary_slave was changed, issue a reselection of
> the active slave, cause the priorities have changed.
>
> Reported-by: Ding Tianhong <dingtianhong@huawei.com>
> CC: Ding Tianhong <dingtianhong@huawei.com>
> CC: Jay Vosburgh <fubar@us.ibm.com>
> CC: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH V3 net-next 1/3] ipv6: add the IPV6_FL_F_REFLECT flag to IPV6_FL_A_GET
From: Hannes Frederic Sowa @ 2014-01-17 1:27 UTC (permalink / raw)
To: Florent Fourcot; +Cc: netdev
In-Reply-To: <1389889158-1710-1-git-send-email-florent.fourcot@enst-bretagne.fr>
On Thu, Jan 16, 2014 at 05:19:16PM +0100, Florent Fourcot wrote:
> @@ -1000,6 +1002,8 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
> ireq = inet_rsk(req);
> ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr;
> ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr;
> + if (np->repflow)
> + np->flow_label = ip6_flowlabel(ipv6_hdr(skb));
> if (!want_cookie || tmp_opt.tstamp_ok)
> TCP_ECN_create_request(req, skb, sock_net(sk));
>
I am not sure here, do you write the flow_label on the listening socket?
Greetings,
Hannes
^ permalink raw reply
* Re: [Xen-devel][PATCH net-next v2] xen-netfront: clean up code in xennet_release_rx_bufs
From: David Miller @ 2014-01-17 1:25 UTC (permalink / raw)
To: annie.li
Cc: david.vrabel, xen-devel, netdev, konrad.wilk, ian.campbell,
wei.liu2, andrew.bennieston
In-Reply-To: <52D7E1BB.8000706@oracle.com>
From: annie li <annie.li@oracle.com>
Date: Thu, 16 Jan 2014 21:42:19 +0800
> What I thought is to split the implementation into two patches, this
> patch fixes the rx path resource leak(just like what tx path does),
> then a separate patch fixes gnttab_end_foreign_access_ref failure
> issue for both tx/rx through taking reference to the page before
> gnttab_end_foreign_access.
> If you'd like they are posted together, I will create new patch for
> the latter and then post them.:-)
That would probably work best.
^ permalink raw reply
* Re: [Patch net-next] net_sched: act: pick a different type for act_xt
From: David Miller @ 2014-01-17 1:24 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, jhs
In-Reply-To: <1389829123-22914-1-git-send-email-xiyou.wangcong@gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 15 Jan 2014 15:38:43 -0800
> In tcf_register_action() we check either ->type or ->kind to see if
> there is an existing action registered, but ipt action registers two
> actions with same type but different kinds. They should have different
> types too.
>
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied.
^ permalink raw reply
* Re: pull request: batman-adv 2014-01-16
From: David Miller @ 2014-01-17 1:23 UTC (permalink / raw)
To: antonio; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1389828263-798-1-git-send-email-antonio@meshcoding.com>
From: Antonio Quartulli <antonio@meshcoding.com>
Date: Thu, 16 Jan 2014 00:24:22 +0100
> here you have one more change by Simon Wunderlich intended for
> net-next/linux-3.14.
>
> This patch is properly formatting some kerneldoc that we already had but
> which has not been written down in a proper way.
>
> Please pull or let me know if something is wrong!
Pulled, thanks.
^ permalink raw reply
* Re: [Patch net-next] net_sched: act: use tcf_hash_release() in net/sched/act_police.c
From: David Miller @ 2014-01-17 1:22 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, jhs
In-Reply-To: <1389828206-9467-1-git-send-email-xiyou.wangcong@gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 15 Jan 2014 15:23:26 -0800
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied, thank you.
^ permalink raw reply
* Re: [net-next 3/3] i40e: updates to AdminQ interface
From: David Miller @ 2014-01-17 1:21 UTC (permalink / raw)
To: aaron.f.brown; +Cc: shannon.nelson, netdev, gospo, sassmann
In-Reply-To: <1389827904-14713-4-git-send-email-aaron.f.brown@intel.com>
From: Aaron Brown <aaron.f.brown@intel.com>
Date: Wed, 15 Jan 2014 15:18:24 -0800
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> Refinements to cloud support in the Firmware API.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Applied.
^ permalink raw reply
* Re: [net-next 2/3] i40e: check desc pointer before printing
From: David Miller @ 2014-01-17 1:21 UTC (permalink / raw)
To: aaron.f.brown; +Cc: shannon.nelson, netdev, gospo, sassmann
In-Reply-To: <1389827904-14713-3-git-send-email-aaron.f.brown@intel.com>
From: Aaron Brown <aaron.f.brown@intel.com>
Date: Wed, 15 Jan 2014 15:18:23 -0800
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> Check that the descriptors were allocated before trying to dump
> them to the logfile. While we're there, de-trick-ify the code
> so as to be easier to read and not abusing the types and unions.
>
> Change-ID: I22898f4b22cecda3582d4d9e4018da9cd540f177
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Applied.
^ permalink raw reply
* Re: pull request [net]: batman-adv 2014-01-16
From: David Miller @ 2014-01-17 1:17 UTC (permalink / raw)
To: antonio; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1389827444-3911-1-git-send-email-antonio@meshcoding.com>
From: Antonio Quartulli <antonio@meshcoding.com>
Date: Thu, 16 Jan 2014 00:10:43 +0100
> here you have a very small fix intended for net/linux-3.13.
>
> This patch is fixing the batman-adv overhead computation
> (by Marek Lindner).
> The result of such operation is used to initialize the
> hard_header_len member of the soft-interface netdev object.
>
> Please pull or let me know of any problem!
Pulled, thanks Antonio.
^ permalink raw reply
* Re: [PATCH net-next 2/2] team: block mtu change before it happens via NETDEV_PRECHANGEMTU
From: David Miller @ 2014-01-17 1:16 UTC (permalink / raw)
To: vfalico; +Cc: netdev, jiri
In-Reply-To: <1389826939-20691-2-git-send-email-vfalico@redhat.com>
From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 16 Jan 2014 00:02:19 +0100
> Now it catches the NETDEV_CHANGEMTU notification, which is signaled after
> the actual change happened on the device, and returns NOTIFY_BAD, so that
> the change on the device is reverted.
>
> This might be quite costly and messy, so use the new NETDEV_PRECHANGEMTU to
> catch the MTU change before the actual change happens and signal that it's
> forbidden to do it.
>
> CC: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Also applied, nice work.
^ permalink raw reply
* Re: [PATCH net-next 1/2] net: add NETDEV_PRECHANGEMTU to notify before mtu change happens
From: David Miller @ 2014-01-17 1:16 UTC (permalink / raw)
To: vfalico; +Cc: netdev, jiri, edumazet, nicolas.dichtel, amwang
In-Reply-To: <1389826939-20691-1-git-send-email-vfalico@redhat.com>
From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 16 Jan 2014 00:02:18 +0100
> Currently, if a device changes its mtu, first the change happens (invloving
> all the side effects), and after that the NETDEV_CHANGEMTU is sent so that
> other devices can catch up with the new mtu. However, if they return
> NOTIFY_BAD, then the change is reverted and error returned.
>
> This is a really long and costy operation (sometimes). To fix this, add
> NETDEV_PRECHANGEMTU notification which is called prior to any change
> actually happening, and if any callee returns NOTIFY_BAD - the change is
> aborted. This way we're skipping all the playing with apply/revert the mtu.
>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: Jiri Pirko <jiri@resnulli.us>
> CC: Eric Dumazet <edumazet@google.com>
> CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> CC: Cong Wang <amwang@redhat.com>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Applied.
^ permalink raw reply
* PANIC in vxlan <debugging now>
From: Jesse Brandeburg @ 2014-01-17 1:14 UTC (permalink / raw)
To: netdev; +Cc: jesse.brandeburg
I'm currently debugging this but given where the kernel release cycle
is I wanted to let the list know.
It may well be a bug in our code, and if it is we'll find it, but here is
the panic, it doesn't occur when vxlan is not enabled.
Jan 16 13:46:44 jbrandeb-cp2 kernel: [ 17.331010] cgroup: libvirtd (1387) created nested cgroup for controller "memory" which has incomplete hierarchy supp
ort. Nested cgroups may change behavior in the future.
Jan 16 13:46:44 jbrandeb-cp2 kernel: [ 17.331014] cgroup: "memory" requires setting use_hierarchy to 1 on the root.
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.576568] ------------[ cut here ]------------
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.586411] kernel BUG at include/net/netns/generic.h:45!
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.596336] invalid opcode: 0000 [#1] SMP
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.606268] Modules linked in: lockd sunrpc i40e igb iTCO_wdt iTCO_vendor_support sb_edac ioatdma ptp microcode lpc_ich edac_core i2c_i801 mfd_core dca pps_core wmi kvm uinput isci firewire_ohci libsas firewire_core crc_itu_t scsi_transport_sas mgag200 drm_kms_helper ttm
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.637923] CPU: 0 PID: 1387 Comm: libvirtd Not tainted 3.13.0-rc7+ #30
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.648599] Hardware name: Intel Corporation S2600CO ........../S2600CO, BIOS SE5C600.86B.01.08.6003.062420131549 06/24/2013
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.659612] task: ffff88063b5c6000 ti: ffff8806333ca000 task.ti: ffff8806333ca000
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.670661] RIP: 0010:[<ffffffff816df92f>] [<ffffffff816df92f>] net_generic.isra.34.part.35+0x4/0x6
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.681738] RSP: 0018:ffff8806333cbb80 EFLAGS: 00010246
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.692536] RAX: 0000000000000000 RBX: 00000000ffffffed RCX: 0000000000000010
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.703577] RDX: ffff88063d03d380 RSI: 0000000000000010 RDI: ffffffff81cfd9f0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.714612] RBP: ffff8806333cbb80 R08: 0000000000000000 R09: ffffffff81cfd9f0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.725531] R10: 00000000000002cc R11: 0000000000000004 R12: 0000000000000000
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.736448] R13: ffff880639118000 R14: ffff8806333cbc68 R15: 0000000000000000
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.747292] FS: 00007f6381830700(0000) GS:ffff880647600000(0000) knlGS:0000000000000000
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.758248] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.769263] CR2: 00007f637c04b000 CR3: 0000000c3aa1f000 CR4: 00000000000407f0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.780402] Stack:
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.791386] ffff8806333cbbc0 ffffffff814d0865 ffff8806333cbc40 00000000ffffffef
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.802702] 00000000ffffffed ffffffff81cc67d0 0000000000000010 ffff8806333cbc68
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.814021] ffff8806333cbc00 ffffffff816e9e5d 0000000000000004 ffff8806333cbc68
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.825185] Call Trace:
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.836106] [<ffffffff814d0865>] vxlan_lowerdev_event+0xf5/0x100
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.847254] [<ffffffff816e9e5d>] notifier_call_chain+0x4d/0x70
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.858457] [<ffffffff810912be>] __raw_notifier_call_chain+0xe/0x10
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.869696] [<ffffffff810912d6>] raw_notifier_call_chain+0x16/0x20
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.880896] [<ffffffff815d9610>] call_netdevice_notifiers_info+0x40/0x70
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.892063] [<ffffffff815d9656>] call_netdevice_notifiers+0x16/0x20
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.903107] [<ffffffff815e1bce>] register_netdevice+0x1be/0x3a0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.914128] [<ffffffff815e1dce>] register_netdev+0x1e/0x30
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.925072] [<ffffffff814cb94a>] loopback_net_init+0x4a/0xb0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.936048] [<ffffffffa016ed6e>] ? lockd_init_net+0x6e/0xb0 [lockd]
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.947081] [<ffffffff815d6bac>] ops_init+0x4c/0x150
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.958070] [<ffffffff815d6d23>] setup_net+0x73/0x110
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.969006] [<ffffffff815d725b>] copy_net_ns+0x7b/0x100
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.979897] [<ffffffff81090e11>] create_new_namespaces+0x101/0x1b0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 17.990855] [<ffffffff81090f45>] copy_namespaces+0x85/0xb0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.001656] [<ffffffff810693d5>] copy_process.part.26+0x935/0x1500
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.012370] [<ffffffff811d5186>] ? mntput+0x26/0x40
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.022924] [<ffffffff8106a15c>] do_fork+0xbc/0x2e0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.033331] [<ffffffff811b7f2e>] ? ____fput+0xe/0x10
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.043622] [<ffffffff81089c5c>] ? task_work_run+0xac/0xe0
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.053905] [<ffffffff8106a406>] SyS_clone+0x16/0x20
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.064265] [<ffffffff816ee689>] stub_clone+0x69/0x90
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.074600] [<ffffffff816ee329>] ? system_call_fastpath+0x16/0x1b
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.084879] Code: 00 75 1d 55 be 2f 00 00 00 48 c7 c7 65 93 a2 81 48 89 e5 e8 f4 b5 98 ff 5d c6 05 30 aa 5f 00 01 c3 55 48 89 e5 0f 0b 55 48 89 e5 <0f> 0b 55 48 89 e5 0f 0b 66 66 66 66 90 55 48 c7 c7 c0 4c cb 81
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.105818] RIP [<ffffffff816df92f>] net_generic.isra.34.part.35+0x4/0x6
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.116106] RSP <ffff8806333cbb80>
Jan 16 13:46:45 jbrandeb-cp2 kernel: [ 18.172366] ---[ end trace 0bb84cf9aa76a384 ]---
Jan 16 13:46:47 jbrandeb-cp2 systemd[1]: Startup finished in 4s 918ms 164us (kernel) + 3s 548ms 460us (initrd) + 11s 2ms 474us (userspace) = 19s 469ms 98us.
Jan 16 13:46:47 jbrandeb-cp2 dbus-daemon[989]: dbus[989]: [system] Activating via systemd: service name='org.freedesktop.Accounts' unit='accounts-daemon.service'
code says:
(gdb) l *(vxlan_lowerdev_event+0xf5)
0xffffffff814d0865 is at include/net/netns/generic.h:41.
34 static inline void *net_generic(const struct net *net, int id)
35 {
36 struct net_generic *ng;
37 void *ptr;
38
39 rcu_read_lock();
40 ng = rcu_dereference(net->gen);
41 BUG_ON(id == 0 || id > ng->len);
42 ptr = ng->ptr[id - 1];
43 rcu_read_unlock();
44
>>>> 45 BUG_ON(!ptr);
46 return ptr;
47 }
48 #endif
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox