On 10/10/2014 04:23 AM, Prarit Bhargava wrote:
>> Sure, but I still think that we are safe here.
>> >
> No, you're not. Dropping a single CPU changes num_online_cpus(), which
> results in
>
> static uint8_t adf_get_dev_node_id(struct pci_dev *pdev)
> {
> unsigned int bus_per_cpu = 0;
> struct cpuinfo_x86 *c = &cpu_data(num_online_cpus() - 1); <<< this
> being different.
>
> if (!c->phys_proc_id)
> return 0;
>
> bus_per_cpu = 256 / (c->phys_proc_id + 1); <<< this being different
>
> if (bus_per_cpu != 0)
> return pdev->bus->number / bus_per_cpu; <<< and this being
> different
> return 0;
> }
You forgot to explain how this is not safe.
T.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html