Re: [PATCH 3/10] kdump: export per cpu crash notes pointer throughsysfs

From: Andrew Morton
Date: Thu Nov 17 2005 - 17:07:07 EST


Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
>
> + /*
> + * Might be reading other cpu's data based on which cpu read thread
> + * has been scheduled. But cpu data (memory) is allocated once during
> + * boot up and this data does not change there after. Hence this
> + * operation should be safe. No locking required.
> + */
> + get_cpu();
> + addr = __pa(per_cpu_ptr(crash_notes, cpunum));
> + rc = sprintf(buf, "%Lx\n", addr);
> + put_cpu();

I don't think the get_cpu() and put_cpu() are needed here?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/