From patchwork Wed Dec 21 16:10:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jike Song X-Patchwork-Id: 9482693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE2916082B for ; Wed, 21 Dec 2016 08:19:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D0C728138 for ; Wed, 21 Dec 2016 08:19:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9128D28285; Wed, 21 Dec 2016 08:19:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26D1128179 for ; Wed, 21 Dec 2016 08:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758669AbcLUITW (ORCPT ); Wed, 21 Dec 2016 03:19:22 -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 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 21 Dec 2016 00:18:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,382,1477983600"; d="scan'208";a="205260340" Received: from unknown (HELO kvmgt1.bj.intel.com) ([10.238.154.158]) by fmsmga004.fm.intel.com with ESMTP; 21 Dec 2016 00:18:52 -0800 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: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Serge Hallyn --- 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)