linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net,stable v3] vhost: fix a few skb leaks
@ 2017-12-01  5:54 wexu
  2017-12-01  5:54 ` [PATCH 1/3] vhost: fix skb leak in handle_rx() wexu
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: wexu @ 2017-12-01  5:54 UTC (permalink / raw)
  To: virtualization, netdev, linux-kernel; +Cc: jasowang, mst, mjrosato, wexu

From: Wei Xu <wexu@redhat.com>

Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch dequing from skb array) as discussed
in the following thread:
https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html

This is v3.

v3:
- move freeing skb from vhost to tun/tap recvmsg() to not
  confuse the callers.

v2:
- add Matthew as the reporter, thanks matthew.
- moving zero headcount check ahead instead of defer consuming skb
  due to jason and mst's comment.
- add freeing skb in favor of recvmsg() fails.

Wei Xu (3):
  vhost: fix skb leak in handle_rx()
  tun: free skb in early errors
  tap: free skb if flags error

 drivers/net/tap.c   |  6 +++++-
 drivers/net/tun.c   | 14 +++++++++++---
 drivers/vhost/net.c | 20 ++++++++++----------
 3 files changed, 26 insertions(+), 14 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH net,stable v4 0/3]  vhost: fix a few skb leaks
@ 2017-12-01 10:10 wexu
  2017-12-01 10:10 ` [PATCH 2/3] tun: free skb in early errors wexu
  0 siblings, 1 reply; 12+ messages in thread
From: wexu @ 2017-12-01 10:10 UTC (permalink / raw)
  To: virtualization, netdev, linux-kernel; +Cc: jasowang, mst, mjrosato, wexu

From: Wei Xu <wexu@redhat.com>

Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch dequing from skb array) as discussed
in the following thread:
https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html

v4:
- fix zero iov iterator count in tap/tap_do_read()(Jason)
- don't put tun in case of EBADFD(Jason)
- Replace msg->msg_control with new 'skb' when calling tun/tap_do_read()

v3:
- move freeing skb from vhost to tun/tap recvmsg() to not
  confuse the callers.

v2:
- add Matthew as the reporter, thanks matthew.
- moving zero headcount check ahead instead of defer consuming skb
  due to jason and mst's comment.
- add freeing skb in favor of recvmsg() fails.

Wei Xu (3):
  vhost: fix skb leak in handle_rx()
  tun: free skb in early errors
  tap: free skb if flags error

 drivers/net/tap.c   | 14 ++++++++++----
 drivers/net/tun.c   | 24 ++++++++++++++++++------
 drivers/vhost/net.c | 20 ++++++++++----------
 3 files changed, 38 insertions(+), 20 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-12-04  7:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01  5:54 [PATCH net,stable v3] vhost: fix a few skb leaks wexu
2017-12-01  5:54 ` [PATCH 1/3] vhost: fix skb leak in handle_rx() wexu
2017-12-01  7:11   ` Jason Wang
2017-12-01 14:37     ` Michael S. Tsirkin
2017-12-04  7:18       ` Jason Wang
2017-12-01  5:54 ` [PATCH 2/3] tun: free skb in early errors wexu
2017-12-01  7:07   ` Jason Wang
2017-12-01 14:36     ` Michael S. Tsirkin
2017-12-01  5:54 ` [PATCH 3/3] tap: free skb if flags error wexu
2017-12-01  7:10   ` Jason Wang
2017-12-01 10:10 [PATCH net,stable v4 0/3] vhost: fix a few skb leaks wexu
2017-12-01 10:10 ` [PATCH 2/3] tun: free skb in early errors wexu
2017-12-01 14:48   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).