All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jasowang@redhat.com
Cc: mst@redhat.com, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	darren.kenny@oracle.com
Subject: Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure
Date: Tue, 27 Mar 2018 13:04:29 -0400 (EDT)	[thread overview]
Message-ID: <20180327.130429.1060831999612495885.davem@davemloft.net> (raw)
In-Reply-To: <1522155052-13347-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Tue, 27 Mar 2018 20:50:52 +0800

> We tried to remove vq poll from wait queue, but do not check whether
> or not it was in a list before. This will lead double free. Fixing
> this by switching to use vhost_poll_stop() which zeros poll->wqh after
> removing poll from waitqueue to make sure it won't be freed twice.
> 
> Cc: Darren Kenny <darren.kenny@oracle.com>
> Reported-by: syzbot+c0272972b01b872e604a@syzkaller.appspotmail.com
> Fixes: 2b8b328b61c79 ("vhost_net: handle polling errors when setting backend")
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> Changes from V1:
> - tweak the commit log for to match the code

Applied and queued up for -stable, thank you.

WARNING: multiple messages have this Message-ID (diff)
From: David Miller <davem@davemloft.net>
To: jasowang@redhat.com
Cc: kvm@vger.kernel.org, mst@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	darren.kenny@oracle.com
Subject: Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure
Date: Tue, 27 Mar 2018 13:04:29 -0400 (EDT)	[thread overview]
Message-ID: <20180327.130429.1060831999612495885.davem@davemloft.net> (raw)
In-Reply-To: <1522155052-13347-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Tue, 27 Mar 2018 20:50:52 +0800

> We tried to remove vq poll from wait queue, but do not check whether
> or not it was in a list before. This will lead double free. Fixing
> this by switching to use vhost_poll_stop() which zeros poll->wqh after
> removing poll from waitqueue to make sure it won't be freed twice.
> 
> Cc: Darren Kenny <darren.kenny@oracle.com>
> Reported-by: syzbot+c0272972b01b872e604a@syzkaller.appspotmail.com
> Fixes: 2b8b328b61c79 ("vhost_net: handle polling errors when setting backend")
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> Changes from V1:
> - tweak the commit log for to match the code

Applied and queued up for -stable, thank you.

  parent reply	other threads:[~2018-03-27 17:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 12:50 [PATCH net V2] vhost: correctly remove wait queue during poll failure Jason Wang
2018-03-27 13:07 ` Darren Kenny
2018-03-27 13:59 ` Michael S. Tsirkin
2018-03-27 13:59 ` Michael S. Tsirkin
2018-03-27 17:04 ` David Miller [this message]
2018-03-27 17:04   ` David Miller
2018-03-29  4:20 ` Michael S. Tsirkin
2018-03-29  4:20 ` Michael S. Tsirkin
2018-03-29  8:01   ` Jason Wang
2018-03-29  8:01   ` Jason Wang
  -- strict thread matches above, loose matches on Subject: below --
2018-03-27 12:50 Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180327.130429.1060831999612495885.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=darren.kenny@oracle.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.