From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Ilya Maximets <i.maximets@samsung.com>, dev@dpdk.org
Cc: Tiwei Bie <tiwei.bie@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] vhost-user: drop connection on message handling failures
Date: Tue, 11 Sep 2018 11:25:01 +0200 [thread overview]
Message-ID: <f3555f57-910d-8b5e-09fa-af87ee6531e1@redhat.com> (raw)
In-Reply-To: <20180903101059eucas1p2030d1e9077a03bc5d0613ba0311e1eab~Q3BXc1AtS3196731967eucas1p2z@eucas1p2.samsung.com>
On 09/03/2018 12:12 PM, Ilya Maximets wrote:
> There are a lot of cases where vhost-user massage handling
> could fail and end up in a fully not recoverable state. For
> example, allocation failures of shadow used ring and batched
> copy array are not recoverable and leads to the segmentation
> faults like this on the receiving/transmission path:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f913fecf0 (LWP 43625)]
> in copy_desc_to_mbuf () at /lib/librte_vhost/virtio_net.c:760
> 760 batch_copy[vq->batch_copy_nb_elems].dst =
>
> This could be easily reproduced in case of low memory or big
> number of vhost-user ports.
>
> Fix that by propagating error to the upper layer which will
> end up with disconnection in case we can not report to
> the message sender when the error happens.
>
> Fixes: f689586bc060 ("vhost: shadow used ring update")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>
> v2:
> * Patch changed to cover most of possible failures at once. [Tiwei Bie]
>
> lib/librte_vhost/vhost_user.c | 51 +++++++++++++++++++++--------------
> 1 file changed, 31 insertions(+), 20 deletions(-)
Applied to dpdk-next-virtio/master.
Thanks!
Maxime
prev parent reply other threads:[~2018-09-11 9:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180817113255eucas1p2042d22241265dafa241c2a6a2c949244@eucas1p2.samsung.com>
2018-08-17 11:33 ` [dpdk-dev] [PATCH] vhost: fix crash if set vring num handling failed Ilya Maximets
2018-08-29 14:00 ` Ilya Maximets
2018-08-30 6:06 ` Tiwei Bie
2018-08-30 6:54 ` Ilya Maximets
2018-09-03 2:26 ` Tiwei Bie
2018-09-03 7:07 ` Ilya Maximets
[not found] ` <CGME20180903101059eucas1p2030d1e9077a03bc5d0613ba0311e1eab@eucas1p2.samsung.com>
2018-09-03 10:12 ` [dpdk-dev] [PATCH v2] vhost-user: drop connection on message handling failures Ilya Maximets
2018-09-10 13:51 ` Maxime Coquelin
2018-09-11 9:25 ` Maxime Coquelin [this message]
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=f3555f57-910d-8b5e-09fa-af87ee6531e1@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=i.maximets@samsung.com \
--cc=stable@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=zhihong.wang@intel.com \
/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).