search for: get_tap_ptr_ring

Displaying 10 results from an estimated 10 matches for "get_tap_ptr_ring".

2018 Mar 09
0
[PATCH net 2/3] vhost_net: keep private_data and rx_ring synced
..._unlock(&vq->mutex); return sock; } @@ -1162,14 +1163,14 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) vhost_net_disable_vq(n, vq); vq->private_data = sock; vhost_net_buf_unproduce(nvq); - if (index == VHOST_NET_VQ_RX) - nvq->rx_ring = get_tap_ptr_ring(fd); r = vhost_vq_init_access(vq); if (r) goto err_used; r = vhost_net_enable_vq(n, vq); if (r) goto err_used; + if (index == VHOST_NET_VQ_RX) + nvq->rx_ring = get_tap_ptr_ring(fd); oldubufs = nvq->ubufs; nvq->ubufs = ubufs; -- 2.7.4
2018 Mar 09
7
[PATCH net 0/3] Several fixes for vhost_net ptr_ring usage
Hi: This small series try to fix several bugs of ptr_ring usage in vhost_net. Please review. Thanks Alexander Potapenko (1): vhost_net: initialize rx_ring in vhost_net_open() Jason Wang (2): vhost_net: keep private_data and rx_ring synced vhost_net: examine pointer types during un-producing drivers/net/tun.c | 3 ++- drivers/vhost/net.c | 8 +++++--- include/linux/if_tun.h | 4
2023 May 05
0
[PATCH] vhost_net: Use fdget() and fdput()
...et.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index ae2273196b0c..5b3fe4805182 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -1466,17 +1466,17 @@ static struct ptr_ring *get_tap_ptr_ring(struct file *file) > > static struct socket *get_tap_socket(int fd) > { > - struct file *file = fget(fd); > + struct fd f = fdget(fd); > struct socket *sock; > > - if (!file) > + if (!f.file) > return ERR_PTR(-EBADF); &...
2023 May 05
0
[PATCH] vhost_net: Use fdget() and fdput()
...s(+), 5 deletions(-) > >> > >> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > >> index ae2273196b0c..5b3fe4805182 100644 > >> --- a/drivers/vhost/net.c > >> +++ b/drivers/vhost/net.c > >> @@ -1466,17 +1466,17 @@ static struct ptr_ring *get_tap_ptr_ring(struct file *file) > >> > >> static struct socket *get_tap_socket(int fd) > >> { > >> - struct file *file = fget(fd); > >> + struct fd f = fdget(fd); > >> struct socket *sock; > >> > >> - if (!file)...
2023 May 11
0
[PATCH] vhost_net: Use fdget() and fdput()
...t.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index ae2273196b0c..5b3fe4805182 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -1466,17 +1466,17 @@ static struct ptr_ring *get_tap_ptr_ring(struct file *file) > > static struct socket *get_tap_socket(int fd) > { > - struct file *file = fget(fd); > + struct fd f = fdget(fd); > struct socket *sock; > > - if (!file) > + if (!f.file) > return ERR_PTR(-EBADF); > - sock = tun_get_socket(file); > +...
2020 Feb 13
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...r, vq); > goto err_used; > + } > r = vhost_net_enable_vq(n, vq); > - if (r) > + if (r) { > + pr_debug("enable_vq index=%u fd=%d r=%d vq=%p", index, fd, r, vq); > goto err_used; > + } > if (index == VHOST_NET_VQ_RX) > nvq->rx_ring = get_tap_ptr_ring(fd); > > @@ -1559,6 +1570,8 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) > > mutex_unlock(&vq->mutex); > > + pr_debug("sock=%p", sock); > + > if (oldubufs) { > vhost_net_ubuf_put_wait_and_free(oldubufs); &...
2020 Feb 14
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...r, vq); > goto err_used; > + } > r = vhost_net_enable_vq(n, vq); > - if (r) > + if (r) { > + pr_debug("enable_vq index=%u fd=%d r=%d vq=%p", index, fd, r, vq); > goto err_used; > + } > if (index == VHOST_NET_VQ_RX) > nvq->rx_ring = get_tap_ptr_ring(fd); > > @@ -1559,6 +1570,8 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) > > mutex_unlock(&vq->mutex); > > + pr_debug("sock=%p", sock); > + > if (oldubufs) { > vhost_net_ubuf_put_wait_and_free(oldubufs); &...
2020 Feb 14
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...gt;>> + pr_debug("enable_vq index=%u fd=%d r=%d vq=%p", index, fd, r, vq); >>> goto err_used; >>> + } >>> if (index == VHOST_NET_VQ_RX) >>> nvq->rx_ring = get_tap_ptr_ring(fd); >>> >>> @@ -1559,6 +1570,8 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) >>> >>> mutex_unlock(&vq->mutex); >>> >>> + pr_debug("sock=%p", sock); >>> + >>>...
2020 Feb 07
16
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
On Fri, Feb 07, 2020 at 08:47:14AM +0100, Christian Borntraeger wrote: > Also adding Cornelia. > > > On 06.02.20 23:17, Michael S. Tsirkin wrote: > > On Thu, Feb 06, 2020 at 04:12:21PM +0100, Christian Borntraeger wrote: > >> > >> > >> On 06.02.20 15:22, eperezma at redhat.com wrote: > >>> Hi Christian. > >>> > >>>
2020 Feb 07
16
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
On Fri, Feb 07, 2020 at 08:47:14AM +0100, Christian Borntraeger wrote: > Also adding Cornelia. > > > On 06.02.20 23:17, Michael S. Tsirkin wrote: > > On Thu, Feb 06, 2020 at 04:12:21PM +0100, Christian Borntraeger wrote: > >> > >> > >> On 06.02.20 15:22, eperezma at redhat.com wrote: > >>> Hi Christian. > >>> > >>>