lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1517534946-49165-1-git-send-email-cordius.wu@huawei.com>
Date:   Fri, 2 Feb 2018 09:29:06 +0800
From:   Wu Zongyong <cordius.wu@...wei.com>
To:     <kvm@...r.kernel.org>
CC:     <kwankhede@...dia.com>, <alex.williamson@...hat.com>,
        <linux-kernel@...r.kernel.org>, <weijinfen@...wei.com>,
        <wanzongshun@...wei.com>
Subject: [PATCH] vfio-mdev: send KOBJ_CHANGE event after creating mdev sysfs files

Like SR-IOV, driver should notify that sysfs files like some attrs or
symbol links after cretation finished.

Signed-off-by: Wu Zongyong <cordius.wu@...wei.com>
---
 drivers/vfio/mdev/mdev_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index 1269910..64cc808 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -351,6 +351,8 @@ int mdev_device_create(struct kobject *kobj, struct device *dev, uuid_le uuid)
 		goto create_failed;
 	}
 
+	kobject_uevent(&(mdev->dev.kobj), KOBJ_CHANGE);
+
 	mdev->type_kobj = kobj;
 	dev_dbg(&mdev->dev, "MDEV: created\n");
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ