lkml.org 
[lkml]   [2019]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net 3/4] vhost: vsock: add weight support
On Thu, May 16, 2019 at 03:47:41AM -0400, Jason Wang wrote:
> @@ -183,7 +184,8 @@ static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)
> virtio_transport_deliver_tap_pkt(pkt);
>
> virtio_transport_free_pkt(pkt);
> - }
> + total_len += pkt->len;

Please increment total_len before virtio_transport_free_pkt(pkt) to
avoid use-after-free.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-05-16 11:35    [W:0.061 / U:0.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site