DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Sahithi Singam <sahithi.singam@oracle.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"eladv6@gmail.com" <eladv6@gmail.com>,
	Igor Ryzhov <iryzhov@nfware.com>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH] kni: fix kernel deadlock due to async changes
Date: Tue, 23 Nov 2021 09:40:42 +0000	[thread overview]
Message-ID: <8f19fa9a-9b72-7e3e-b1fa-eeaa09be0941@intel.com> (raw)
In-Reply-To: <BYAPR10MB3541AD1AC6131D86FF71445FF4B59@BYAPR10MB3541.namprd10.prod.outlook.com>

On 10/11/2021 7:35 AM, Sahithi Singam wrote:
> From: Sahithi Singam <sahithi.singam@oracle.com <mailto:sahithi.singam@oracle.com>>
> 
> Async user request changes resulted in a kernel deadlock when used with linux kernel version>= 5.12.
> 
> Starting from linux kernel version 5.12, a new global semaphore dev_addr_sem was introduced in dev_set_mac_address_user() function that should be acquired and released along with rtnl_lock when a mac address set request was received from userspace.
> 
> When a mac address set request is received on KNI interface, before sending request to userspace, kni code is releasing rtnl_lock without releasing dev_addr_sem semaphore. After receiving a response it is again trying to hold rtnl_lock. These changes were added as part of async user request changes to fix a kernel deadlock with bifurcated devices.
> 
> This code is resulting in deadlock as kni is just releasing rtnl_lock without releasing semaphore while mac address set request on some other device  could have acquired rtnl_lock and could be waiting for dev_addr_sem held by the current device.
> 
> As a solution, support async user request changes based on a module parameter. This will limit kernel deadlock issue to users using KNI over bifurcated devices with kernel versions >= 5.12.
> 
> Bugzilla ID: 816
> 
> Fixes: 631217c76135 ("kni: fix kernel deadlock with bifurcated device")
> 
> Cc: eladv6@gmail.com <mailto:eladv6@gmail.com>
> 
> Signed-off-by: Sahithi Singam <sahithi.singam@oracle.com <mailto:sahithi.singam@oracle.com>>
> 

Hi Sahithi,

Since the patch is in html format, it is not detected by patchwork
and we missed it.

Can you please check if this patch different from the one I have sent
for same purpose:
https://patches.dpdk.org/project/dpdk/patch/20211008235830.127167-1-ferruh.yigit@intel.com/

If they are same, would you be OK to continue with above one?

      reply	other threads:[~2021-11-23  9:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  6:35 [dpdk-dev] " Sahithi Singam
2021-11-23  9:40 ` Ferruh Yigit [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=8f19fa9a-9b72-7e3e-b1fa-eeaa09be0941@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=eladv6@gmail.com \
    --cc=iryzhov@nfware.com \
    --cc=sahithi.singam@oracle.com \
    --cc=thomas@monjalon.net \
    /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).