lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe7919b0-726d-6296-d1ca-ad55e5dd77fe@cn.fujitsu.com>
Date:   Tue, 20 Jun 2017 12:21:57 +0800
From:   Dou Liyang <douly.fnst@...fujitsu.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
CC:     Marc Zyngier <marc.zyngier@....com>,
        Christoph Hellwig <hch@....de>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Jens Axboe <axboe@...nel.dk>,
        Keith Busch <keith.busch@...el.com>
Subject: Re: [patch 19/55] genirq: Provide irq_fixup_move_pending()

Hi Thomas,

At 06/20/2017 07:37 AM, Thomas Gleixner wrote:
[...]
>
> +/**
> + * irq_fixup_move_pending - Cleanup irq move pending from a dying CPU
> + * @desc:		Interrupt descpriptor to clean up
> + * @force_clear:	If set clear the move pending bit unconditionally.
> + *			If not set, clear it only when the dying CPU is the
> + *			last one in the pending mask.
> + *
> + * Returns true if the pending bit was set and the pending mask contains an
> + * online CPU other than the dying CPU.
> + */
> +bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear)
> +{
> +	struct irq_data *data = irq_desc_get_irq_data(desc);
> +
> +	if (!irqd_is_setaffinity_pending(data))
> +		return false;
> +
> +	/*
> +	 * The outgoing CPU might be the last online target in a pending
> +	 * interrupt move. If that's the case clear the pending move bit.
> +	 */
> +	if (cpumask_any_and(desc->pending_mask, cpu_online_mask) > nr_cpu_ids) {

Should we consider the case of "=nr_cpu_ids" here, like:

cpumask_any_and(desc->pending_mask, cpu_online_mask) >= nr_cpu_ids


Thanks.
	Dou

> +		irqd_clr_move_pending(data);
> +		return false;
> +	}
> +	if (force_clear)
> +		irqd_clr_move_pending(data);
> +	return true;
> +}
> +
>  void irq_move_masked_irq(struct irq_data *idata)
>  {
>  	struct irq_desc *desc = irq_data_to_desc(idata);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ