thunderbolt: Fix for v4.18-rc3
cover thunderbolt: Fix for v4.18-rc3
Hi Greg,
This fixes missing change event towards userspace when preboot ACL list is updated. The patch is included as well if you prefer to apply it directly instead of pulling the signed tag.
The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40:
Linux 4.18-rc1 (2018-06-17 08:04:49 +0900)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git tags/thunderbolt-fixes-for-v4.18-rc3
for you to fetch changes up to 5912f4e3bb89b81d78d657656dd0591895ea004e:
thunderbolt: Notify userspace when boot_acl is changed (2018-06-20 16:13:54 +0300)
Mika Westerberg (1):
thunderbolt: Notify userspace when boot_acl is changed
drivers/thunderbolt/domain.c | 4 ++++ 1 file changed, 4 insertions(+)
Signature · 1 line
2.18.0
PATCH 1/1 thunderbolt: Notify userspace when boot_acl is changed
The commit 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") introduced boot_acl attribute but missed the fact that now userspace needs to poll the attribute constantly to find out whether it has changed or not. Fix this by sending notification to the userspace whenever the boot_acl attribute is changed.
--- drivers/thunderbolt/domain.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/thunderbolt/domain.c +4 -0
@@ -213,6 +213,10 @@ static ssize_t boot_acl_store(struct device *dev, struct device_attribute *attr, goto err_free_acl; } ret = tb->cm_ops->set_boot_acl (tb, acl, tb->nboot_acl); +if (!ret) { +/* Notify userspace about the change */ +kobject_uevent (&tb->dev.kobj,KOBJ_CHANGE ); + }mutex_unlock (&tb->lock); err_free_acl:
Signature · 1 line
2.18.0