From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E841A0508 for ; Tue, 17 May 2022 15:15:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 876EE415D7; Tue, 17 May 2022 15:15:22 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 443C840042 for ; Tue, 17 May 2022 15:15:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4xsCA0bno+qKu/G7EdaecYmCJerowefSrSSj3XZ6KjM=; b=XFdBdA5yH9BxyfRvNCl8b9BNwjD4yoFWr75h11CSvdDuDhDNDzLz6nQKx91b4gQL+HupfV +JRaiWW4NEoIuHKkO8RxP0faPHzf7GxEnvebtbbJaqDjxs8JsKUVk/rU6oXk4d+/Q6KXvH 3VtzKjliz2nGA2z2I/uNl7QuLfkkUVI= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-daSiXQ-WNX6iMjL0fL1axg-1; Tue, 17 May 2022 09:15:16 -0400 X-MC-Unique: daSiXQ-WNX6iMjL0fL1axg-1 Received: by mail-lf1-f72.google.com with SMTP id z9-20020a0565120c0900b00477a61b93a1so854463lfu.16 for ; Tue, 17 May 2022 06:15:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4xsCA0bno+qKu/G7EdaecYmCJerowefSrSSj3XZ6KjM=; b=OO4NYgfJChhHwOSCTDlf5NIOXUhAiWmgQ0k7qkp4ZJpCt3PmkJ1z1GL0nbhomOa2rX CvYNeV9ebER+sg5UeUCFlFX5b2CXqvhpuvI4APa6//OHiFVCRvqg0GkTsnyDxlL225ZH pRe44ECbIvJdG1sNbKO7cbTLjOmlnqmFz+GehqCL1eJjx2Jmu+aovmKrZu7acEGN8LLh vn0I14jYKQsdjZsE+EaHBrAwvyRHHaJbvfc9++4YLWysRLoZDWcnIC4wP+9SWXLeLFcQ jORa2XdB8W4nXK0Ux0WSYePffYVhWJqA59jAvH3mwvi1chQh+FEGxC6QFpAxoAoueDZs xXTg== X-Gm-Message-State: AOAM532REsFQMWW5lRoeBgTJPUxEqQfh3VP+xkzMEqpvnWSjK3rUjpUX 1/CmVYQQJk/DwZoHFR/vt0CBSGiqFAH3fxO+sAmJEyrcnWDHrgfYfHCaNialMH2eTKJpUhFB9QV WprtbwOgDIAOWW08EShae0XE= X-Received: by 2002:a2e:81d1:0:b0:24f:728:a16c with SMTP id s17-20020a2e81d1000000b0024f0728a16cmr14231085ljg.333.1652793314834; Tue, 17 May 2022 06:15:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd8c+jLISLrOsEU/z/i6DmjUzZdZLrubc4u/yRDkBS9L6omzlo5IxbQ+Df9YxiKLys3Y/ztMlIGItzm/PLAms= X-Received: by 2002:a2e:81d1:0:b0:24f:728:a16c with SMTP id s17-20020a2e81d1000000b0024f0728a16cmr14231076ljg.333.1652793314649; Tue, 17 May 2022 06:15:14 -0700 (PDT) MIME-Version: 1.0 References: <20220505134008.2865-1-wenwux.ma@intel.com> <20220507132753.11357-1-wenwux.ma@intel.com> In-Reply-To: <20220507132753.11357-1-wenwux.ma@intel.com> From: David Marchand Date: Tue, 17 May 2022 15:15:03 +0200 Message-ID: Subject: Re: [PATCH v3] vhost: fix deadlock when message handling failed To: Wenwu Ma Cc: Maxime Coquelin , "Xia, Chenbo" , dev , Jiayu Hu , "Wang, Yinan" , xingguang.he@intel.com, dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Sat, May 7, 2022 at 7:30 AM Wenwu Ma wrote: > > In vhost_user_msg_handler(), if vhost message handling > failed, we should check whether the queue is locked and > release the lock before returning. Or, it will cause a > deadlock later. > > Fixes: 7f31d4ea05ca ("vhost: fix lock on device readiness notification") > Cc: stable@dpdk.org > > Signed-off-by: Wenwu Ma Thanks, lgtm. Acked-by: David Marchand -- David Marchand