mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: tip-bot2@linutronix.de, Hagar Hemdan <hagarhem@amazon.com>,
	Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	stable@vger.kernel.org, x86@kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [tip: irq/urgent] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
Date: Mon, 3 Jun 2024 16:40:48 +0200	[thread overview]
Message-ID: <b828257d-5c69-4ff5-89e1-5d2aaf53a5e4@web.de> (raw)
In-Reply-To: <171741750653.10875.4371546608500601999.tip-bot2@tip-bot2>

…
> [ tglx: Use guard() instead of goto ]
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -1992,6 +1970,8 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
>  	if (!is_v4(its_dev->its))
>  		return -EINVAL;
>
> +	guard(raw_spinlock_irq, &its_dev->event_map.vlpi_lock);
> +
>  	/* Unmap request? */
>  	if (!info)
>  		return its_vlpi_unmap(d);

I found a similar guard() call in the implementation of the function “task_state_match”.
https://elixir.bootlin.com/linux/v6.10-rc2/source/kernel/sched/core.c#L2264

A slightly different combination of parentheses is applied there.
How do you think about to apply the following code variant accordingly?

+	guard(raw_spinlock_irq)(&its_dev->event_map.vlpi_lock);


Regards,
Markus

  reply	other threads:[~2024-06-03 14:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 16:21 [PATCH v4] " Hagar Hemdan
2024-05-31 17:39 ` Marc Zyngier
2024-06-03 12:25 ` [tip: irq/urgent] " tip-bot2 for Hagar Hemdan
2024-06-03 14:40   ` Markus Elfring [this message]
2024-06-03 16:01   ` Marc Zyngier
2024-06-03 16:20     ` Thomas Gleixner
2024-06-03 16:26 ` tip-bot2 for Hagar Hemdan

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=b828257d-5c69-4ff5-89e1-5d2aaf53a5e4@web.de \
    --to=markus.elfring@web.de \
    --cc=hagarhem@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tip-bot2@linutronix.de \
    --cc=x86@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®