* [PATCH 1/1] Signed-off-by: Jan Wang <bbw725@163.com>
@ 2016-12-11 15:31 Jan Wang
2016-12-11 20:27 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: Jan Wang @ 2016-12-11 15:31 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jan Wang
[net]: Missing init queue tail
Accept queue tail doesn't initialize NULL.
Though looks like no harm, unify it with reqsk_queue_remove(
it will initialize tail to NULL when empty).
Signed-off-by: Jan Wang <bbw725@163.com>
---
net/core/request_sock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index 5d26056..1392bab 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -47,6 +47,7 @@ void reqsk_queue_alloc(struct request_sock_queue *queue)
queue->fastopenq.qlen = 0;
queue->rskq_accept_head = NULL;
+ queue->rskq_accept_tail = NULL;
}
/*
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] Signed-off-by: Jan Wang <bbw725@163.com>
2016-12-11 15:31 [PATCH 1/1] Signed-off-by: Jan Wang <bbw725@163.com> Jan Wang
@ 2016-12-11 20:27 ` Eric Dumazet
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2016-12-11 20:27 UTC (permalink / raw)
To: Jan Wang; +Cc: David S. Miller, netdev
On Sun, 2016-12-11 at 23:31 +0800, Jan Wang wrote:
> [net]: Missing init queue tail
>
> Accept queue tail doesn't initialize NULL.
> Though looks like no harm, unify it with reqsk_queue_remove(
> it will initialize tail to NULL when empty).
Well, if having a NULL or not causes no harm, what about removing
code, instead of adding some defensive one ?
Also your patch submission is wrong :
Title should not include 'Signed-off-by...'
Anyway, net-next is closed, you'll have to wait before submitting such a
change.
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 6ebe13eb1c4cbcd84c4b3345b051b3320d7591e6..a655c6aea7c0c8c429d5629c7fb639d6de832438 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -195,8 +195,6 @@ static inline struct request_sock *reqsk_queue_remove(struct request_sock_queue
if (req) {
sk_acceptq_removed(parent);
queue->rskq_accept_head = req->dl_next;
- if (queue->rskq_accept_head == NULL)
- queue->rskq_accept_tail = NULL;
}
spin_unlock_bh(&queue->rskq_lock);
return req;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-11 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-11 15:31 [PATCH 1/1] Signed-off-by: Jan Wang <bbw725@163.com> Jan Wang
2016-12-11 20:27 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox