mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Naman Jain <namjain@linux.microsoft.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	Roman Kisel <romank@linux.microsoft.com>,
	Saurabh Sengar <ssengar@linux.microsoft.com>,
	linux-hyperv@vger.kernel.org, Dexuan Cui <decui@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Alok Tiwari <alok.a.tiwari@oracle.com>,
	Anirudh Rayabharam <anrayabh@linux.microsoft.com>,
	Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Subject: Re: [PATCH v5 2/2] Drivers: hv: Introduce mshv_vtl driver
Date: Tue, 22 Jul 2025 14:46:43 +0530	[thread overview]
Message-ID: <cf2ec1ca-c65b-4e32-8aaf-75b77d294092@linux.microsoft.com> (raw)
In-Reply-To: <68120ea5-d3ba-4077-a605-50a0b5188761@web.de>



On 7/20/2025 12:00 AM, Markus Elfring wrote:
> …
>> +++ b/drivers/hv/mshv_vtl_main.c
>> @@ -0,0 +1,1783 @@
> …
>> +static int mshv_vtl_sint_ioctl_set_eventfd(struct mshv_vtl_set_eventfd __user *arg)
>> +{
> …
>> +	mutex_lock(&flag_lock);
>> +	old_eventfd = flag_eventfds[set_eventfd.flag];
>> +	WRITE_ONCE(flag_eventfds[set_eventfd.flag], eventfd);
>> +	mutex_unlock(&flag_lock);
> …
> 
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&flag_lock);”?
> https://elixir.bootlin.com/linux/v6.16-rc6/source/include/linux/mutex.h#L225
> 
> Regards,
> Markus

I didn't know about it, TBH. I will use it in this driver in all places.
I have tested the same in my setup.

Thanks.

Regards,
Naman

      reply	other threads:[~2025-07-22  9:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11  7:27 [PATCH v5 0/2] Drivers: hv: Introduce new driver - mshv_vtl Naman Jain
2025-06-11  7:27 ` [PATCH v5 1/2] Drivers: hv: Export some symbols for mshv_vtl Naman Jain
2025-06-11  7:27 ` [PATCH v5 2/2] Drivers: hv: Introduce mshv_vtl driver Naman Jain
2025-06-11 16:46   ` Nuno Das Neves
2025-06-11 18:00     ` Easwar Hariharan
2025-07-09 17:19   ` Michael Kelley
2025-07-10  9:01     ` Naman Jain
2025-07-17 16:21     ` Nuno Das Neves
2025-07-18  4:36     ` Naman Jain
2025-07-18 15:07       ` Michael Kelley
2025-07-22 11:09         ` Naman Jain
2025-07-22 17:09           ` Michael Kelley
2025-07-23  9:58             ` Naman Jain
2025-07-23 14:13               ` Michael Kelley
2025-07-19 18:30   ` Markus Elfring
2025-07-22  9:16     ` Naman Jain [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=cf2ec1ca-c65b-4e32-8aaf-75b77d294092@linux.microsoft.com \
    --to=namjain@linux.microsoft.com \
    --cc=Markus.Elfring@web.de \
    --cc=alok.a.tiwari@oracle.com \
    --cc=anrayabh@linux.microsoft.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nunodasneves@linux.microsoft.com \
    --cc=romank@linux.microsoft.com \
    --cc=skinsburskii@linux.microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=wei.liu@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

all inboxes | Powered by JetHome®