* [PATCH 0/1] thunderbolt: Fix for v4.18-rc3
@ 2018-06-26 11:46 Mika Westerberg
2018-06-26 11:46 ` [PATCH 1/1] thunderbolt: Notify userspace when boot_acl is changed Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Mika Westerberg @ 2018-06-26 11:46 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Andreas Noever, Michael Jamet, Yehezkel Bernat, Mika Westerberg,
linux-kernel
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(+)
--
2.18.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] thunderbolt: Notify userspace when boot_acl is changed
2018-06-26 11:46 [PATCH 0/1] thunderbolt: Fix for v4.18-rc3 Mika Westerberg
@ 2018-06-26 11:46 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2018-06-26 11:46 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Andreas Noever, Michael Jamet, Yehezkel Bernat, Mika Westerberg,
linux-kernel
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.
Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL")
Reported-and-tested-by: Christian Kellner <christian@kellner.me>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Christian Kellner <christian@kellner.me>
Acked-by: Yehezkel Bernat <yehezkelshb@gmail.com>
Cc: stable@vger.kernel.org
---
drivers/thunderbolt/domain.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index 6281266b8ec0..a923ebdeb73c 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -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:
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-26 11:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-26 11:46 [PATCH 0/1] thunderbolt: Fix for v4.18-rc3 Mika Westerberg
2018-06-26 11:46 ` [PATCH 1/1] thunderbolt: Notify userspace when boot_acl is changed Mika Westerberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox