[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c66642f9-2e8f-8c0c-d9d0-91489fe1413d@nvidia.com>
Date: Wed, 13 Apr 2022 02:22:21 +0530
From: Kirti Wankhede <kwankhede@...dia.com>
To: Christoph Hellwig <hch@....de>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Zhenyu Wang <zhenyuw@...ux.intel.com>,
Zhi Wang <zhi.a.wang@...el.com>
Cc: Jason Gunthorpe <jgg@...dia.com>, intel-gfx@...ts.freedesktop.org,
intel-gvt-dev@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 33/34] vfio/mdev: Use the driver core to create the
'remove' file
On 4/11/2022 7:44 PM, Christoph Hellwig wrote:
> From: Jason Gunthorpe <jgg@...dia.com>
>
> The device creator is supposed to use the dev.groups value to add sysfs
> files before device_add is called, not call sysfs_create_files() after
> device_add() returns. This creates a race with uevent delivery where the
> extra attribute will not be visible.
>
> This was being done because the groups had been co-opted by the mdev
> driver, now that prior patches have moved the driver's groups to the
> struct device_driver the dev.group is properly free for use here.
>
> Signed-off-by: Jason Gunthorpe <jgg@...dia.com>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
> drivers/vfio/mdev/mdev_core.c | 1 +
> drivers/vfio/mdev/mdev_private.h | 2 ++
> drivers/vfio/mdev/mdev_sysfs.c | 19 ++++++++++---------
> 3 files changed, 13 insertions(+), 9 deletions(-)
>
Reviewed-by: Kirti Wankhede <kwankhede@...dia.com>
Powered by blists - more mailing lists