Re: [PATCH v2] nvdimm: Avoid race between probe and reading device attributes

From: Richard Palethorpe
Date: Tue Feb 02 2021 - 12:02:18 EST


Hello Dan,

Dan Williams <dan.j.williams@xxxxxxxxx> writes:
>
> I see why this works, but I think the bug is in
> available_slots_show(). It is a bug for a sysfs attribute to reference
> driver-data without synchronizing against bind. So it should be
> possible for probe set that pointer whenever it wants. In other words
> this fix (forgive the whitespace damage from pasting).

Ah, that makes sense! I see the new patch and all is good AFAICT.

--
Thank you,
Richard.