stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: natechancellor@gmail.com, Jason@zx2c4.com, davem@davemloft.net,
	gregkh@linuxfoundation.org, jasowang@redhat.com, mst@redhat.com,
	sergei.shtylyov@cogentembedded.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "virtio_net: check return value of skb_to_sgvec in one more location" has been added to the 3.18-stable tree
Date: Tue, 10 Apr 2018 14:34:01 +0200	[thread overview]
Message-ID: <152336364124017@kroah.com> (raw)
In-Reply-To: <20180410012150.6573-4-natechancellor@gmail.com>


This is a note to let you know that I've just added the patch titled

    virtio_net: check return value of skb_to_sgvec in one more location

to the 3.18-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-check-return-value-of-skb_to_sgvec-in-one-more-location.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From natechancellor@gmail.com  Tue Apr 10 14:13:23 2018
From: Nathan Chancellor <natechancellor@gmail.com>
Date: Mon,  9 Apr 2018 18:21:44 -0700
Subject: virtio_net: check return value of skb_to_sgvec in one more location
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org
Cc: Nathan Chancellor <natechancellor@gmail.com>, "Jason A . Donenfeld" <Jason@zx2c4.com>, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, "David S . Miller" <davem@davemloft.net>
Message-ID: <20180410012150.6573-4-natechancellor@gmail.com>

From: Nathan Chancellor <natechancellor@gmail.com>

Kernels that do not have f6b10209b90d ("virtio-net: switch to use
build_skb() for small buffer") will have an extra call to skb_to_sgvec
that is not handled by e2fcad58fd23 ("virtio_net: check return value of
skb_to_sgvec always"). Since the former does not appear to be stable
material, just fix the call up directly.

Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/virtio_net.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -551,7 +551,12 @@ static int add_recvbuf_small(struct rece
 	hdr = skb_vnet_hdr(skb);
 	sg_init_table(rq->sg, MAX_SKB_FRAGS + 2);
 	sg_set_buf(rq->sg, &hdr->hdr, sizeof hdr->hdr);
-	skb_to_sgvec(skb, rq->sg + 1, 0, skb->len);
+
+	err = skb_to_sgvec(skb, rq->sg + 1, 0, skb->len);
+	if (unlikely(err < 0)) {
+		dev_kfree_skb(skb);
+		return err;
+	}
 
 	err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp);
 	if (err < 0)


Patches currently in stable-queue which might be from natechancellor@gmail.com are

queue-3.18/ipsec-check-return-value-of-skb_to_sgvec-always.patch
queue-3.18/rxrpc-check-return-value-of-skb_to_sgvec-always.patch
queue-3.18/virtio_net-check-return-value-of-skb_to_sgvec-always.patch
queue-3.18/virtio_net-check-return-value-of-skb_to_sgvec-in-one-more-location.patch

  reply	other threads:[~2018-04-10 12:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10  1:21 Further fixes for 48a1df65334b Nathan Chancellor
2018-04-10  1:21 ` [PATCH 3.18 1/3] rxrpc: check return value of skb_to_sgvec always Nathan Chancellor
2018-04-10  1:21 ` [PATCH 3.18 2/3] virtio_net: " Nathan Chancellor
2018-04-10  1:21 ` [PATCH 3.18 3/3] virtio_net: check return value of skb_to_sgvec in one more location Nathan Chancellor
2018-04-10 12:34   ` gregkh [this message]
2018-04-10  1:21 ` [PATCH 4.4 1/3] rxrpc: check return value of skb_to_sgvec always Nathan Chancellor
2018-04-10  1:21 ` [PATCH 4.4 2/3] virtio_net: " Nathan Chancellor
2018-04-10  1:21 ` [PATCH 4.4 3/3] virtio_net: check return value of skb_to_sgvec in one more location Nathan Chancellor
2018-04-10  9:07   ` Patch "virtio_net: check return value of skb_to_sgvec in one more location" has been added to the 4.4-stable tree gregkh
2018-04-10  1:21 ` [PATCH 4.9 1/3] rxrpc: check return value of skb_to_sgvec always Nathan Chancellor
2018-04-10  1:21 ` [PATCH 4.9 2/3] virtio_net: " Nathan Chancellor
2018-04-10  1:21 ` [PATCH 4.9 3/3] virtio_net: check return value of skb_to_sgvec in one more location Nathan Chancellor
2018-04-10  6:35   ` Greg Kroah-Hartman
2018-04-10  7:11     ` Greg Kroah-Hartman
2018-04-10  7:12   ` Patch "virtio_net: check return value of skb_to_sgvec in one more location" has been added to the 4.9-stable tree gregkh
2018-04-10 12:53 ` Further fixes for 48a1df65334b Greg Kroah-Hartman

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=152336364124017@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=natechancellor@gmail.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).