[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1510131539010.25029@nanos>
Date: Tue, 13 Oct 2015 15:40:59 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Qais Yousef <qais.yousef@...tec.com>
cc: linux-kernel@...r.kernel.org, jason@...edaemon.net,
marc.zyngier@....com, jiang.liu@...ux.intel.com,
ralf@...ux-mips.org, linux-mips@...ux-mips.org
Subject: Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi
On Tue, 13 Oct 2015, Qais Yousef wrote:
Lacks kerneldoc
> +int __irq_desc_send_ipi(struct irq_desc *desc, const struct ipi_mask *dest)
> +{
> + struct irq_data *data = irq_desc_get_irq_data(desc);
> + struct irq_chip *chip = irq_data_get_irq_chip(data);
> +
> + if (!chip || !chip->irq_send_ipi)
> + return -EINVAL;
> +
> + /*
> + * Do not validate the mask for IPIs marked global. These are
> + * regular IPIs so we can avoid the operation as their target
> + * mask is the cpu_possible_mask.
> + */
> + if (!dest->global) {
> + if (!bitmap_subset(dest->cpumask, data->ipi_mask.cpumask,
> + dest->nbits))
> + return -EINVAL;
> + }
This looks half thought out. You rely on the caller getting the global
bit right. There should be a sanity check for this versus
data->ipi_mask and also you need to validate nbits.
> +EXPORT_SYMBOL(irq_send_ipi);
EXPORT_SYMBOL_GPL please
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists