Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758857AbcLUITX (ORCPT ); Wed, 21 Dec 2016 03:19:23 -0500 Received: from mga11.intel.com ([192.55.52.93]:15296 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754732AbcLUISz (ORCPT ); Wed, 21 Dec 2016 03:18:55 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,382,1477983600"; d="scan'208";a="205260340" From: Jike Song To: serge@hallyn.com, alex.williamson@redhat.com Cc: linux-security-module@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kwankhede@nvidia.com, kraxel@redhat.com, jike.song@intel.com Subject: [PATCH 1/2] capability: export has_capability Date: Thu, 22 Dec 2016 00:10:15 +0800 Message-Id: <1482336616-19252-2-git-send-email-jike.song@intel.com> X-Mailer: git-send-email 2.4.4.488.gdf97e5d In-Reply-To: <1482336616-19252-1-git-send-email-jike.song@intel.com> References: <1482336616-19252-1-git-send-email-jike.song@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 725 Lines: 24 has_capability() is sometimes needed by modules to test capability for specified task other than current, so export it. Cc: Alex Williamson Cc: Kirti Wankhede Signed-off-by: Jike Song --- kernel/capability.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/capability.c b/kernel/capability.c index 4984e1f..e2e198c 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -318,6 +318,7 @@ bool has_capability(struct task_struct *t, int cap) { return has_ns_capability(t, &init_user_ns, cap); } +EXPORT_SYMBOL(has_capability); /** * has_ns_capability_noaudit - Does a task have a capability (unaudited) -- 2.4.4.488.gdf97e5d