linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Andres Beltran <t-mabelt@microsoft.com>
Cc: Wei Liu <wei.liu@kernel.org>,
	Andres Beltran <lkmlabelt@gmail.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michael Kelley <mikelley@microsoft.com>,
	"parri.andrea@gmail.com" <parri.andrea@gmail.com>
Subject: Re: [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening
Date: Mon, 29 Jun 2020 19:06:44 +0000	[thread overview]
Message-ID: <20200629190644.hlem6jskyx26csaj@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <CH2PR21MB149464F9EF20C516C6FB362A8B6E0@CH2PR21MB1494.namprd21.prod.outlook.com>

On Mon, Jun 29, 2020 at 06:19:46PM +0000, Andres Beltran wrote:
[...]
> > >  EXPORT_SYMBOL_GPL(vmbus_recvpacket_raw);
> > > +
> > > +/*
> > > + * vmbus_next_request_id - Returns a new request id. It is also
> > > + * the index at which the guest memory address is stored.
> > > + * Uses a spin lock to avoid race conditions.
> > > + * @rqstor: Pointer to the requestor struct
> > > + * @rqst_add: Guest memory address to be stored in the array
> > > + */
> > > +u64 vmbus_next_request_id(struct vmbus_requestor *rqstor, u64 rqst_addr)
> > > +{
> > > +	unsigned long flags;
> > > +	u64 current_id;
> > > +
> > > +	spin_lock_irqsave(&rqstor->req_lock, flags);
> > 
> > Do you really need the irqsave variant here? I.e. is there really a
> > chance this code is reachable from an interrupt handler?
> 
> Other VMBus drivers will also need to use this functionality, and
> some of them will be called with interrupts disabled. So, I think
> we should keep the irqsave variant here.
> 

Okay. This makes sense.

Wei.

  reply	other threads:[~2020-06-29 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 18:19 [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening Andres Beltran
2020-06-29 19:06 ` Wei Liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-25 15:37 [PATCH 0/3] Drivers: hv: vmbus: vmbus_requestor data structure Andres Beltran
2020-06-25 15:37 ` [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening Andres Beltran
2020-06-26 13:19   ` Wei Liu

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=20200629190644.hlem6jskyx26csaj@liuwe-devbox-debian-v2 \
    --to=wei.liu@kernel.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkmlabelt@gmail.com \
    --cc=mikelley@microsoft.com \
    --cc=parri.andrea@gmail.com \
    --cc=sthemmin@microsoft.com \
    --cc=t-mabelt@microsoft.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).