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]
Date:	Thu, 21 May 2015 12:48:04 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Feng Wu <feng.wu@...el.com>
cc:	joro@...tes.org, dwmw2@...radead.org, jiang.liu@...ux.intel.com,
	iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [v6 3/8] iommu, x86: Implement irq_set_vcpu_affinity for
 intel_ir_chip

On Thu, 21 May 2015, Feng Wu wrote:
> +static int intel_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)
> +{
> +	struct intel_ir_data *ir_data = data->chip_data;
> +	struct irte *irte_pi = &ir_data->irte_pi_entry;
> +	struct vcpu_data *vcpu_pi_info;
> +
> +	/* stop posting interrupts, back to remapping mode */
> +	if (!vcpu_info)
> +		modify_irte(&ir_data->irq_2_iommu, &ir_data->irte_entry);
> +	else {

We add braces to both branches if one requires it.

> +		vcpu_pi_info = (struct vcpu_data *)vcpu_info;
> +		memcpy(irte_pi, &ir_data->irte_entry, sizeof(struct irte));

This lacks a comment WHY you copy irte_entry to irte_pi_entry and WHY
we have two seperate entries stored in ir_data.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ