lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190117143913.7c178e2f@redhat.com>
Date:   Thu, 17 Jan 2019 14:39:13 +0100
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
        "David S. Miller" <davem@...emloft.net>,
        "Michael S. Tsirkin" <mst@...hat.com>, netdev@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, brouer@...hat.com
Subject: Re: [PATCH net 6/7] virtio_net: Use xdp_return_frame to free
 xdp_frames on destroying vqs

On Thu, 17 Jan 2019 20:56:39 +0800
Jason Wang <jasowang@...hat.com> wrote:

> On 2019/1/17 下午7:20, Toshiaki Makita wrote:
> > put_page() can work as a fallback for freeing xdp_frames, but the
> > appropriate way is to use xdp_return_frame().
> >
> > Fixes: cac320c850ef ("virtio_net: convert to use generic xdp_frame and xdp_return_frame API")
> > Signed-off-by: Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
> > ---
> >   drivers/net/virtio_net.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> > index ae93f0e..996de69 100644
> > --- a/drivers/net/virtio_net.c
> > +++ b/drivers/net/virtio_net.c
> > @@ -2668,7 +2668,7 @@ static void free_unused_bufs(struct virtnet_info *vi)
> >   			if (!is_xdp_raw_buffer_queue(vi, i))
> >   				dev_kfree_skb(buf);
> >   			else
> > -				put_page(virt_to_head_page(buf));
> > +				xdp_return_frame(buf);

I assume the is_xdp_raw_buffer_queue() test assures that this void *buf
is a struct xdp_frame.

> >   		}
> >   	}
> >     
> 
> 
> Acked-by: Jason Wang <jasowang@...hat.com>

Acked-by: Jesper Dangaard Brouer <brouer@...hat.com>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ