From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:36394 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbeBWLOH (ORCPT ); Fri, 23 Feb 2018 06:14:07 -0500 Subject: Patch "virtio_net: fix return value check in receive_mergeable()" has been added to the 4.14-stable tree To: wangyunjian@huawei.com, alexander.levin@verizon.com, gregkh@linuxfoundation.org, mst@redhat.com Cc: , From: Date: Fri, 23 Feb 2018 12:11:22 +0100 Message-ID: <151938428273228@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled virtio_net: fix return value check in receive_mergeable() to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: virtio_net-fix-return-value-check-in-receive_mergeable.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Feb 23 11:45:09 CET 2018 From: Yunjian Wang Date: Mon, 4 Dec 2017 14:02:19 +0800 Subject: virtio_net: fix return value check in receive_mergeable() From: Yunjian Wang [ Upstream commit 03e9f8a05bce7330bcd9c5cc54c8e42d0fcbf993 ] The function virtqueue_get_buf_ctx() could return NULL, the return value 'buf' need to be checked with NULL, not value 'ctx'. Signed-off-by: Yunjian Wang Signed-off-by: Michael S. Tsirkin Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -714,7 +714,7 @@ static struct sk_buff *receive_mergeable int num_skb_frags; buf = virtqueue_get_buf_ctx(rq->vq, &len, &ctx); - if (unlikely(!ctx)) { + if (unlikely(!buf)) { pr_debug("%s: rx error: %d buffers out of %d missing\n", dev->name, num_buf, virtio16_to_cpu(vi->vdev, Patches currently in stable-queue which might be from wangyunjian@huawei.com are queue-4.14/virtio_net-fix-return-value-check-in-receive_mergeable.patch