mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:50:58 +07:00
b29d6a435e
[ Upstream commit b5a1f8921d5040bb788492bf33a66758021e4be5 ]
There is a small race where the parent is NULL even though the kobj has
already been made visible in sysfs.
For instance the attribute_group is made visible in sysfs_create_files()
and the mdev_type_attr_show() does:
ret = attr->show(kobj, type->parent->dev, buf);
Which will crash on NULL parent. Move the parent setup to before the type
pointer leaves the stack frame.
Fixes:
|
||
---|---|---|
.. | ||
fsl-mc | ||
mdev | ||
pci | ||
platform | ||
Kconfig | ||
Makefile | ||
vfio_iommu_spapr_tce.c | ||
vfio_iommu_type1.c | ||
vfio_spapr_eeh.c | ||
vfio.c | ||
virqfd.c |