[PATCHv2] nvme/hwmon: rework to avoid devm allocation

Daniel Wagner dwagner at suse.de
Tue Jan 19 03:03:48 EST 2021


On Tue, Jan 19, 2021 at 07:43:18AM +0100, Hannes Reinecke wrote:
> The original design to use device-managed resource allocation
> doesn't really work as the NVMe controller has a vastly different
> lifetime than the hwmon sysfs attributes, causing warning about
> duplicate sysfs entries upon reconnection.

To give Guenter a bit more info, it is not just warnings, user space is
able to crash the system by reading the hwmon entries when the nvme
device has been removed.

and here is the initial report and discussion on this:

  https://lore.kernel.org/linux-nvme/20201209213228.5044-1-ematsumiya@suse.de/



More information about the Linux-nvme mailing list