From: Yehezkel Bernat <yehezkelshb@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andreas Noever <andreas.noever@gmail.com>,
michael.jamet@intel.com, christian@kellner.me,
Mario Limonciello <mario.limonciello@dell.com>,
lukas@wunner.de
Subject: Re: [PATCH] thunderbolt: Notify userspace when boot_acl is changed
Date: Mon, 18 Jun 2018 18:54:00 +0300 [thread overview]
Message-ID: <CA+CmpXuACmU_S69tQmtC1CGbx-jn0g5NJF_p1dNTTaRMPCp+5g@mail.gmail.com> (raw)
In-Reply-To: <20180618144404.21055-1-mika.westerberg@linux.intel.com>
On Mon, Jun 18, 2018 at 5:44 PM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> 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-by: Christian Kellner <ckellner@redhat.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> 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.17.1
>
Acked-by: Yehezkel Bernat <yehezkelshb@gmail.com>
next prev parent reply other threads:[~2018-06-18 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:44 [PATCH] thunderbolt: Notify userspace when boot_acl is changed Mika Westerberg
2018-06-18 15:54 ` Yehezkel Bernat [this message]
2018-06-20 13:17 ` Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+CmpXuACmU_S69tQmtC1CGbx-jn0g5NJF_p1dNTTaRMPCp+5g@mail.gmail.com \
--to=yehezkelshb@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=christian@kellner.me \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mario.limonciello@dell.com \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).