From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] virtio-net: correct error handling of virtqueue_kick() Date: Thu, 27 Mar 2014 13:14:11 -0400 (EDT) Message-ID: <20140327.131411.1257894502376926151.davem@davemloft.net> References: <1395810180-35169-1-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395810180-35169-1-git-send-email-jasowang@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: jasowang@redhat.com Cc: mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org From: Jason Wang Date: Wed, 26 Mar 2014 13:03:00 +0800 > Current error handling of virtqueue_kick() was wrong in two places: > - The skb were freed immediately when virtqueue_kick() fail during > xmit. This may lead double free since the skb was not detached from > the virtqueue. > - try_fill_recv() returns false when virtqueue_kick() fail. This will > lead unnecessary rescheduling of refill work. > > Actually, it's safe to just ignore the kick failure in those two > places. So this patch fixes this by partially revert commit > 67975901183799af8e93ec60e322f9e2a1940b9b. > > Fixes 67975901183799af8e93ec60e322f9e2a1940b9b > (virtio_net: verify if virtqueue_kick() succeeded). > > Cc: Heinz Graalfs > Cc: Rusty Russell > Cc: Michael S. Tsirkin > Signed-off-by: Jason Wang Applied and queued up for -stable, thanks.