search for: vhost_net_vq_reset

Displaying 20 results from an estimated 42 matches for "vhost_net_vq_reset".

2013 Jun 05
0
[PATCH] vhost: Make local function static
$ make C=1 M=drivers/vhost drivers/vhost/net.c:168:5: warning: symbol 'vhost_net_set_ubuf_info' was not declared. Should it be static? drivers/vhost/net.c:194:6: warning: symbol 'vhost_net_vq_reset' was not declared. Should it be static? drivers/vhost/scsi.c:219:6: warning: symbol 'tcm_vhost_done_inflight' was not declared. Should it be static? Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/net.c | 4 ++-- drivers/vhost/scsi.c | 2 +- 2 files changed, 3 i...
2013 Jun 05
0
[PATCH] vhost: Make local function static
$ make C=1 M=drivers/vhost drivers/vhost/net.c:168:5: warning: symbol 'vhost_net_set_ubuf_info' was not declared. Should it be static? drivers/vhost/net.c:194:6: warning: symbol 'vhost_net_vq_reset' was not declared. Should it be static? drivers/vhost/scsi.c:219:6: warning: symbol 'tcm_vhost_done_inflight' was not declared. Should it be static? Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/net.c | 4 ++-- drivers/vhost/scsi.c | 2 +- 2 files changed, 3 i...
2013 Jun 20
0
[PATCH RFC] vhost-net: make more functions static
...++ b/drivers/vhost/net.c @@ -167,7 +167,7 @@ static void vhost_net_clear_ubuf_info(struct vhost_net *n) } } -int vhost_net_set_ubuf_info(struct vhost_net *n) +static int vhost_net_set_ubuf_info(struct vhost_net *n) { bool zcopy; int i; @@ -188,7 +188,7 @@ err: return -ENOMEM; } -void vhost_net_vq_reset(struct vhost_net *n) +static void vhost_net_vq_reset(struct vhost_net *n) { int i; -- MST
2013 Jun 20
0
[PATCH RFC] vhost-net: make more functions static
...++ b/drivers/vhost/net.c @@ -167,7 +167,7 @@ static void vhost_net_clear_ubuf_info(struct vhost_net *n) } } -int vhost_net_set_ubuf_info(struct vhost_net *n) +static int vhost_net_set_ubuf_info(struct vhost_net *n) { bool zcopy; int i; @@ -188,7 +188,7 @@ err: return -ENOMEM; } -void vhost_net_vq_reset(struct vhost_net *n) +static void vhost_net_vq_reset(struct vhost_net *n) { int i; -- MST
2013 Jun 04
2
vhost && kernel BUG at /build/linux/mm/slub.c:3352!
...7c0000 0000000000000000 0000000000000000 ffff8800b9a960f8 [179906.472638] ffff8800ba06f6a0 ffff880092f2fdf0 ffffffff81c1c6df ffff88001a7c0000 [179906.476583] ffff880092f2fe18 ffffffff81c1c771 ffff8800b69718c0 0000000000000008 [179906.480377] Call Trace: [179906.481636] [<ffffffff81c1c6df>] vhost_net_vq_reset+0x7f/0xb0 [179906.484611] [<ffffffff81c1c771>] vhost_net_release+0x61/0xb0 [179906.487481] [<ffffffff8123237a>] __fput+0x12a/0x230 [179906.489968] [<ffffffff81232489>] ____fput+0x9/0x10 [179906.492422] [<ffffffff8113a79e>] task_work_run+0xae/0xf0 [179906.495169] [<ff...
2013 Jun 04
2
vhost && kernel BUG at /build/linux/mm/slub.c:3352!
...7c0000 0000000000000000 0000000000000000 ffff8800b9a960f8 [179906.472638] ffff8800ba06f6a0 ffff880092f2fdf0 ffffffff81c1c6df ffff88001a7c0000 [179906.476583] ffff880092f2fe18 ffffffff81c1c771 ffff8800b69718c0 0000000000000008 [179906.480377] Call Trace: [179906.481636] [<ffffffff81c1c6df>] vhost_net_vq_reset+0x7f/0xb0 [179906.484611] [<ffffffff81c1c771>] vhost_net_release+0x61/0xb0 [179906.487481] [<ffffffff8123237a>] __fput+0x12a/0x230 [179906.489968] [<ffffffff81232489>] ____fput+0x9/0x10 [179906.492422] [<ffffffff8113a79e>] task_work_run+0xae/0xf0 [179906.495169] [<ff...
2017 Dec 24
2
[PATCH] vhost: remove unused lock check flag in vhost_dev_cleanup()
...+++ b/drivers/vhost/net.c @@ -996,7 +996,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 71517b3c5558..797d08916553 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -1420,7 +1420,7 @@ static int vhost_scsi_release(struct inode *inode, struct file *f) mutex_unlock(&...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...g ubufs. > * Protected by vq mutex. Writers must also take device mutex. */ > struct vhost_net_ubuf_ref *ubufs; > + struct skb_array *rx_array; > + void *rxq[VHOST_RX_BATCH]; > + int rt; > + int rh; > }; > > struct vhost_net { > @@ -201,6 +208,8 @@ static void vhost_net_vq_reset(struct vhost_net *n) > n->vqs[i].ubufs = NULL; > n->vqs[i].vhost_hlen = 0; > n->vqs[i].sock_hlen = 0; > + n->vqs[i].rt = 0; > + n->vqs[i].rh = 0; > } > > } > @@ -503,13 +512,30 @@ static void handle_tx(struct vhost_net *net) > mutex_unl...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...g ubufs. > * Protected by vq mutex. Writers must also take device mutex. */ > struct vhost_net_ubuf_ref *ubufs; > + struct skb_array *rx_array; > + void *rxq[VHOST_RX_BATCH]; > + int rt; > + int rh; > }; > > struct vhost_net { > @@ -201,6 +208,8 @@ static void vhost_net_vq_reset(struct vhost_net *n) > n->vqs[i].ubufs = NULL; > n->vqs[i].vhost_hlen = 0; > n->vqs[i].sock_hlen = 0; > + n->vqs[i].rt = 0; > + n->vqs[i].rh = 0; > } > > } > @@ -503,13 +512,30 @@ static void handle_tx(struct vhost_net *net) > mutex_unl...
2015 Apr 17
0
[PATCH] Revert "vhost: fix release path lockdep checks"
...+++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -418,7 +418,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory) { int i;...
2015 Apr 17
0
[PATCH RESEND] Revert "vhost: fix release path lockdep checks"
...+++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -418,7 +418,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory) { int i;...
2017 Mar 23
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
.... Writers must also take device mutex. */ >> struct vhost_net_ubuf_ref *ubufs; >> + struct skb_array *rx_array; >> + void *rxq[VHOST_RX_BATCH]; >> + int rt; >> + int rh; >> }; >> >> struct vhost_net { >> @@ -201,6 +208,8 @@ static void vhost_net_vq_reset(struct vhost_net *n) >> n->vqs[i].ubufs = NULL; >> n->vqs[i].vhost_hlen = 0; >> n->vqs[i].sock_hlen = 0; >> + n->vqs[i].rt = 0; >> + n->vqs[i].rh = 0; >> } >> >> } >> @@ -503,13 +512,30 @@ static void handle_...
2018 Jan 25
1
[PATCH net] vhost_net: stop device during reset owner
...36c7c 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1208,6 +1208,7 @@ static long vhost_net_reset_owner(struct vhost_net *n) } vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); + vhost_dev_stop(&n->dev); vhost_dev_reset_owner(&n->dev, umem); vhost_net_vq_reset(n); done: -- 2.7.4
2015 Apr 17
0
[PATCH] Revert "vhost: fix release path lockdep checks"
...+++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -418,7 +418,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory) { int i;...
2015 Apr 17
0
[PATCH RESEND] Revert "vhost: fix release path lockdep checks"
...+++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -418,7 +418,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory) { int i;...
2013 Jun 06
0
[PATCH net 2/2] vhost: fix ubuf_info cleanup
...+180,7 @@ int vhost_net_set_ubuf_info(struct vhost_net *n) return 0; err: - while (i--) { - zcopy = vhost_net_zcopy_mask & (0x1 << i); - if (!zcopy) - continue; - kfree(n->vqs[i].ubuf_info); - } + vhost_net_clear_ubuf_info(n); return -ENOMEM; } @@ -196,12 +188,12 @@ void vhost_net_vq_reset(struct vhost_net *n) { int i; + vhost_net_clear_ubuf_info(n); + for (i = 0; i < VHOST_NET_VQ_MAX; i++) { n->vqs[i].done_idx = 0; n->vqs[i].upend_idx = 0; n->vqs[i].ubufs = NULL; - kfree(n->vqs[i].ubuf_info); - n->vqs[i].ubuf_info = NULL; n->vqs[i].vhost_hle...
2013 Jun 05
0
vhost && kernel BUG at /build/linux/mm/slub.c:3352!
...00000 > ffff8800b9a960f8 > [179906.472638] ffff8800ba06f6a0 ffff880092f2fdf0 ffffffff81c1c6df > ffff88001a7c0000 > [179906.476583] ffff880092f2fe18 ffffffff81c1c771 ffff8800b69718c0 > 0000000000000008 > [179906.480377] Call Trace: > [179906.481636] [<ffffffff81c1c6df>] vhost_net_vq_reset+0x7f/0xb0 > [179906.484611] [<ffffffff81c1c771>] vhost_net_release+0x61/0xb0 > [179906.487481] [<ffffffff8123237a>] __fput+0x12a/0x230 > [179906.489968] [<ffffffff81232489>] ____fput+0x9/0x10 > [179906.492422] [<ffffffff8113a79e>] task_work_run+0xae/0xf0 >...
2019 Jun 14
2
memory leak in vhost_net_ioctl
...vhost_net_flush() no longer release ubuf. 3_> in both reset_owner and release pathes, see vhost_net_reset_owner() and vhost_net_release() please, vq is reset in wake of flush: vhost_net_flush(n); vhost_dev_stop(&n->dev); vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); 4_> the ubufs pointer is cleared in vhost_net_vq_reset() #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master Can you give it a shoot please if there is not anything missed in the above logic? Thanks Hillf ------->8--- --- drivers/vhost/net.c | 2 ++ 1...
2019 Jun 14
2
memory leak in vhost_net_ioctl
...vhost_net_flush() no longer release ubuf. 3_> in both reset_owner and release pathes, see vhost_net_reset_owner() and vhost_net_release() please, vq is reset in wake of flush: vhost_net_flush(n); vhost_dev_stop(&n->dev); vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); 4_> the ubufs pointer is cleared in vhost_net_vq_reset() #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master Can you give it a shoot please if there is not anything missed in the above logic? Thanks Hillf ------->8--- --- drivers/vhost/net.c | 2 ++ 1...
2017 Mar 21
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...virtqueue { /* Reference counting for outstanding ubufs. * Protected by vq mutex. Writers must also take device mutex. */ struct vhost_net_ubuf_ref *ubufs; + struct skb_array *rx_array; + void *rxq[VHOST_RX_BATCH]; + int rt; + int rh; }; struct vhost_net { @@ -201,6 +208,8 @@ static void vhost_net_vq_reset(struct vhost_net *n) n->vqs[i].ubufs = NULL; n->vqs[i].vhost_hlen = 0; n->vqs[i].sock_hlen = 0; + n->vqs[i].rt = 0; + n->vqs[i].rh = 0; } } @@ -503,13 +512,30 @@ static void handle_tx(struct vhost_net *net) mutex_unlock(&vq->mutex); } -static int peek_head...