Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2038592imm; Mon, 16 Jul 2018 00:39:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcYyq1bFLhPXQvfVczZKTj4oRg834XTD8fnk6H3Se4ytB2zJOjGHaEVh8Pqz9xqU1KwW0Ln X-Received: by 2002:a63:90c8:: with SMTP id a191-v6mr9130437pge.173.1531726752129; Mon, 16 Jul 2018 00:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531726752; cv=none; d=google.com; s=arc-20160816; b=t+X9uL3Z8NqfKO+u+kL0vs2OcGzhTCxBNT6fuYGWwNv/PJBoi8gl0vpVHi5mn3eiNI 0J6coxwwM7J0P24iPuue2UBVeXJuwpVqKOtCYDitjtTEou3JplfDqAYZSGFcbRWj+Z1x XHzC5MaKq+e52vffJRKWzsPL6Jv2HhayniVunhnUyE52Rhy6UpL+zmWZwblAyVJ8lVkP yn81KLv6M3wCzjhS5vxM/ZXQMr58ayYC3AOfG9qZEsYruXpuSwnuaAyNdomlpC8Wb2YU nes9AyCGznefyV+ZmEi+xJMkJjazoodaJRIWYTS/IZ8oU1pDX/sXE8rzuaqz+Gb/bAns CD2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rKHP+qkz7R9Y/d7VE1O+jU1qLgxnGVzXtp1pQYiJbVo=; b=oLxiXeAiG1iljXBgJDgq0WOuyIFIO21wDTJqeQnH8PPVNXcidDFEIq4vN4w9x/T7u+ 9FQI3hFuivz+HU/1Xw8cCGkM+1prMPHaS5Lc/OvOACpJTyzCXecrVYDTkT6mW/kFv2QC IlrNMlUFsk6zKtjXIDno4Tmv/euN00nOPDKmCdUKfIV6nToTcpb5SKQCPqa9DIYxV/SA Ybvc1EbsdclMPXaHsmLjkIw4jZyF4HCIQk9FwfCDpcUEVRxLo2Eflutdy2uXRYsHNVAu EoqoIkHYe3+dtOC/Es1lweiKRxmF1ELUAeUHUmu0paJ3qRe+qs9C5+QRhe3aqXaGpiH/ M+Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m70-v6si33395934pfa.45.2018.07.16.00.38.57; Mon, 16 Jul 2018 00:39:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731341AbeGPIDO (ORCPT + 99 others); Mon, 16 Jul 2018 04:03:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46674 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728460AbeGPIDN (ORCPT ); Mon, 16 Jul 2018 04:03:13 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C9F3BC03; Mon, 16 Jul 2018 07:37:12 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mika Westerberg , Christian Kellner , Yehezkel Bernat Subject: [PATCH 4.17 23/67] thunderbolt: Notify userspace when boot_acl is changed Date: Mon, 16 Jul 2018 09:34:52 +0200 Message-Id: <20180716073446.678897013@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180716073443.294323458@linuxfoundation.org> References: <20180716073443.294323458@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mika Westerberg commit 007a74907deeceefef9dc3ec4679fbd7921eaa51 upstream. 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 Signed-off-by: Mika Westerberg Reviewed-by: Christian Kellner Acked-by: Yehezkel Bernat Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/thunderbolt/domain.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -213,6 +213,10 @@ static ssize_t boot_acl_store(struct dev 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: