From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76997C433F5 for ; Tue, 14 Dec 2021 18:24:07 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-551-XubqbUz9O4mYWya6NKSN-A-1; Tue, 14 Dec 2021 13:23:58 -0500 X-MC-Unique: XubqbUz9O4mYWya6NKSN-A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EC97801B25; Tue, 14 Dec 2021 18:23:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10FD57EFFC; Tue, 14 Dec 2021 18:23:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D40101806D2C; Tue, 14 Dec 2021 18:23:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BE5wf4v029484 for ; Tue, 14 Dec 2021 00:58:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7D55B492CA4; Tue, 14 Dec 2021 05:58:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 78E41492C3B for ; Tue, 14 Dec 2021 05:58:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5E81580029D for ; Tue, 14 Dec 2021 05:58:41 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-kFR_VXx6Miy4qaTMAX6LXQ-1; Tue, 14 Dec 2021 00:58:37 -0500 X-MC-Unique: kFR_VXx6Miy4qaTMAX6LXQ-1 Received: by mail-pj1-f41.google.com with SMTP id j6-20020a17090a588600b001a78a5ce46aso16398149pji.0; Mon, 13 Dec 2021 21:58:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uE8tm7fba5U6NBtNlVs+75ZMG9iOEUJb31FfCod84+w=; b=UG7xmErTYpjwO4sc1gFrc67s75xYQeBcbyIA7puclOBrJGPI3dTqX8JNrSqNWtpBxz osQn8j6QIbY09EsOMB+3zwIoh2hFrQcEe+izFU/ZJHQBMAHzHHgISwseyuB5Nzm+gIYV 4eGOf9cUSDVh79cguCAsYQfv4h8dYJc7x2g6y2FWnF2vhdsQ5hE+icqkXyIjyKXahS/k ApEsNmLjKOw+6kRYPsEOj9+4Hg9vHCZ4JwbpYs8PA56R9v4pzYVELpmFyD0x724f/PsD NQ8dgjefZ24AY0pK765l5Vh5vuEVurpaeZd1C//weR1E9tw/2u7Y+z7FJktsFr0nTCoC i1eg== X-Gm-Message-State: AOAM532xsTnSORAwtl3HlvWNNmrFavkxyRKwrY9L/3mi4I+nBaNrYptg ew6Ky4p7m7BaCz4QT6xe4HtRL6xLLn45L4Op X-Google-Smtp-Source: ABdhPJw6AuSqH/TZUjqfvsk1KhigqT3WeS/B3avdSl+QZpNNsPQ1+e71qbUYWXziTJBd0aPeGSopHA== X-Received: by 2002:a17:90b:230c:: with SMTP id mt12mr3398651pjb.63.1639461516315; Mon, 13 Dec 2021 21:58:36 -0800 (PST) Received: from localhost ([110.141.142.237]) by smtp.gmail.com with ESMTPSA id nn4sm1071069pjb.38.2021.12.13.21.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 21:58:35 -0800 (PST) Date: Tue, 14 Dec 2021 16:58:32 +1100 From: Balbir Singh To: Leo Yan Subject: Re: [PATCH v2 4/7] connector/cn_proc: Use task_is_in_init_pid_ns() Message-ID: References: <20211208083320.472503-1-leo.yan@linaro.org> <20211208083320.472503-5-leo.yan@linaro.org> MIME-Version: 1.0 In-Reply-To: <20211208083320.472503-5-leo.yan@linaro.org> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Tue, 14 Dec 2021 13:23:34 -0500 Cc: codalist@telemann.coda.cs.cmu.edu, Jan Harkes , Leon Romanovsky , Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , netdev@vger.kernel.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, Eric Paris , coda@cs.cmu.edu, linux-audit@redhat.com, Jakub Kicinski , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Mike Leach X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Dec 08, 2021 at 04:33:17PM +0800, Leo Yan wrote: > This patch replaces open code with task_is_in_init_pid_ns() to check if > a task is in root PID namespace. > > Signed-off-by: Leo Yan > --- > drivers/connector/cn_proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c > index 646ad385e490..ccac1c453080 100644 > --- a/drivers/connector/cn_proc.c > +++ b/drivers/connector/cn_proc.c > @@ -358,7 +358,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg, > * other namespaces. > */ > if ((current_user_ns() != &init_user_ns) || > - (task_active_pid_ns(current) != &init_pid_ns)) > + !task_is_in_init_pid_ns(current)) > return; > Sounds like there might scope for other wrappers - is_current_in_user_init_ns() Acked-by: Balbir Singh -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D51F1C433F5 for ; Tue, 14 Dec 2021 05:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gARlweltusU/ZvzbkTk8VdZvMwMXrdhWT76Zk7AjEpQ=; b=dpRZeMuefTN1gA s5XwKTbDI0vpzMA/U5G+r1wHQ2b0pmf+zQNF3OkQA+3h/Wu9e8jlwdnVCwrbKaMdWAIsAC4XIIbMy rLkhqxWc5TcPTKI0M+VO7XxtjcWJt6qF1T2RiKO9TYmeUC2TSlAaTnlBnI0+mqExLuEgbABCu35b4 D+UCqgH13X0qurboGhFB02NjBj0OjHpNRoEKcIL72c440fPCp2pqvULYBLezlvQ7lQg963TfB37Hu Zu5h75tIHNu0G4nqWy2ETZiAqT6DDnmXVc+akKyeBArd0l8g7ryJle/1ByvVJyYTMq2mvyyV/V5j6 jM/C3YHmG6VSY9eD1btg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx0pl-00CguZ-I9; Tue, 14 Dec 2021 05:58:41 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx0pg-00Cgta-UQ for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 05:58:38 +0000 Received: by mail-pj1-x1031.google.com with SMTP id k6-20020a17090a7f0600b001ad9d73b20bso15217463pjl.3 for ; Mon, 13 Dec 2021 21:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uE8tm7fba5U6NBtNlVs+75ZMG9iOEUJb31FfCod84+w=; b=dCYD2p897oCg0sRe1lmek/4jFC+FOSIkEee2sTpRc6SP1ff9GiS90q8sDeKKlPfIdv 3QCeDPSWw+94OEan2cXREv4sAw+6KQQz931C9FZU1TDUN3fNL9eescfMg58gPsE217zK SFYD1ivheYnLXTjnTNXlKrSq29uEJc+EA9wDeokdKudFDT6fIPEHq4OlFtz+9Y2jvlEQ N0l4XWVXK8kMADWcFI+67iuusPs4K+GMdgMDyDA+HHm4zm3iuMqKzGhhY5xDDBxW9gpX kASBhlhS2jwJdgNex7uDYnU3gMeonWhCIATBNE6ICyaxGAsD5hqZyfUsqwV+s32wo0Rx ZHEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uE8tm7fba5U6NBtNlVs+75ZMG9iOEUJb31FfCod84+w=; b=T8e2J0UTbOpzriBltfDai3VV75D+c32Kuxb6jA8bRXWs+k6dX10TIRyDcZke8+EEe8 StWcrLpN1sT4aBWMKsYb7b4h+XVlSNSE0H+OtjHZIzlcegUnif2XAXfVoZ1hJd6/eAN0 Gn+WxEdX3C4mPT5u1N+5FVYs2d3VRyVXDcqGZ2D3CtN6x2mJHEQ4zo68J89y2zZwRgp6 4aETEA4DaVREN8n7klQ6PmJM0dwoYWDg4RjKnIySt1/uJGm5P199DNek/oz3eKgCGSoG nPI6kVSdkH22YoGKZgV+OsJFbqDFQcSDeqFL/Z+5ZeqA+dsVigcxojO4ma7RFucrKyQc Mucw== X-Gm-Message-State: AOAM531/nZCk0j5REz+HbnEHy6bTy2piR4l3cVkl9evqb7BSQAzx/Khw YulQ3CWdcVpA8tl3pGE9mks= X-Google-Smtp-Source: ABdhPJw6AuSqH/TZUjqfvsk1KhigqT3WeS/B3avdSl+QZpNNsPQ1+e71qbUYWXziTJBd0aPeGSopHA== X-Received: by 2002:a17:90b:230c:: with SMTP id mt12mr3398651pjb.63.1639461516315; Mon, 13 Dec 2021 21:58:36 -0800 (PST) Received: from localhost ([110.141.142.237]) by smtp.gmail.com with ESMTPSA id nn4sm1071069pjb.38.2021.12.13.21.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 21:58:35 -0800 (PST) Date: Tue, 14 Dec 2021 16:58:32 +1100 From: Balbir Singh To: Leo Yan Cc: "David S. Miller" , Jakub Kicinski , Leon Romanovsky , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jan Harkes , coda@cs.cmu.edu, Paul Moore , Eric Paris , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, codalist@coda.cs.cmu.edu, linux-audit@redhat.com Subject: Re: [PATCH v2 4/7] connector/cn_proc: Use task_is_in_init_pid_ns() Message-ID: References: <20211208083320.472503-1-leo.yan@linaro.org> <20211208083320.472503-5-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211208083320.472503-5-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_215837_023141_7B45429F X-CRM114-Status: GOOD ( 16.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 08, 2021 at 04:33:17PM +0800, Leo Yan wrote: > This patch replaces open code with task_is_in_init_pid_ns() to check if > a task is in root PID namespace. > > Signed-off-by: Leo Yan > --- > drivers/connector/cn_proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c > index 646ad385e490..ccac1c453080 100644 > --- a/drivers/connector/cn_proc.c > +++ b/drivers/connector/cn_proc.c > @@ -358,7 +358,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg, > * other namespaces. > */ > if ((current_user_ns() != &init_user_ns) || > - (task_active_pid_ns(current) != &init_pid_ns)) > + !task_is_in_init_pid_ns(current)) > return; > Sounds like there might scope for other wrappers - is_current_in_user_init_ns() Acked-by: Balbir Singh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFEE6C433F5 for ; Tue, 14 Dec 2021 05:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230179AbhLNF6i (ORCPT ); Tue, 14 Dec 2021 00:58:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbhLNF6h (ORCPT ); Tue, 14 Dec 2021 00:58:37 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E7C4C061574; Mon, 13 Dec 2021 21:58:37 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id np6-20020a17090b4c4600b001a90b011e06so15204381pjb.5; Mon, 13 Dec 2021 21:58:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uE8tm7fba5U6NBtNlVs+75ZMG9iOEUJb31FfCod84+w=; b=dCYD2p897oCg0sRe1lmek/4jFC+FOSIkEee2sTpRc6SP1ff9GiS90q8sDeKKlPfIdv 3QCeDPSWw+94OEan2cXREv4sAw+6KQQz931C9FZU1TDUN3fNL9eescfMg58gPsE217zK SFYD1ivheYnLXTjnTNXlKrSq29uEJc+EA9wDeokdKudFDT6fIPEHq4OlFtz+9Y2jvlEQ N0l4XWVXK8kMADWcFI+67iuusPs4K+GMdgMDyDA+HHm4zm3iuMqKzGhhY5xDDBxW9gpX kASBhlhS2jwJdgNex7uDYnU3gMeonWhCIATBNE6ICyaxGAsD5hqZyfUsqwV+s32wo0Rx ZHEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uE8tm7fba5U6NBtNlVs+75ZMG9iOEUJb31FfCod84+w=; b=XkslM/elFFE+/y7kls5PMybEx+h/1z2iETObg/YoH+7nzgOxFaPP3mm8ZWIV7wy8Z9 pAAm6Z+TsSto1mNjymXeGwIk0raFCAqgjDzgVw2Y3zcn8knlY/li/Xz+WXMC/sjefJJV nWl1sNcdTMKdFnPGAIwZ9k+O2d67SyqB13LsKUkNiWlxVnzmWLrR/WL1siAQoJpa8Gzn 64YMUJIswatUz0Vyk1K0xQqApdSCF4kRQDkbbclsNKqR+yaj84dkuDFOb4UyMeyHMprc zrWKOF/vzgW/DT4zLTyeST5higHkVlT1MP8dcR1ypeGdJa4X1Hdr0VyJn9YhwO/1eDB4 2sqQ== X-Gm-Message-State: AOAM533yhbkKCz6gslPwoIWlQnRyhq2p6F74vb17f33eanrONzESZP6k 83G+jIG7PL1z5VQUTe8qNzQ= X-Google-Smtp-Source: ABdhPJw6AuSqH/TZUjqfvsk1KhigqT3WeS/B3avdSl+QZpNNsPQ1+e71qbUYWXziTJBd0aPeGSopHA== X-Received: by 2002:a17:90b:230c:: with SMTP id mt12mr3398651pjb.63.1639461516315; Mon, 13 Dec 2021 21:58:36 -0800 (PST) Received: from localhost ([110.141.142.237]) by smtp.gmail.com with ESMTPSA id nn4sm1071069pjb.38.2021.12.13.21.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 21:58:35 -0800 (PST) Date: Tue, 14 Dec 2021 16:58:32 +1100 From: Balbir Singh To: Leo Yan Cc: "David S. Miller" , Jakub Kicinski , Leon Romanovsky , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jan Harkes , coda@cs.cmu.edu, Paul Moore , Eric Paris , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, codalist@coda.cs.cmu.edu, linux-audit@redhat.com Subject: Re: [PATCH v2 4/7] connector/cn_proc: Use task_is_in_init_pid_ns() Message-ID: References: <20211208083320.472503-1-leo.yan@linaro.org> <20211208083320.472503-5-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211208083320.472503-5-leo.yan@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 08, 2021 at 04:33:17PM +0800, Leo Yan wrote: > This patch replaces open code with task_is_in_init_pid_ns() to check if > a task is in root PID namespace. > > Signed-off-by: Leo Yan > --- > drivers/connector/cn_proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c > index 646ad385e490..ccac1c453080 100644 > --- a/drivers/connector/cn_proc.c > +++ b/drivers/connector/cn_proc.c > @@ -358,7 +358,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg, > * other namespaces. > */ > if ((current_user_ns() != &init_user_ns) || > - (task_active_pid_ns(current) != &init_pid_ns)) > + !task_is_in_init_pid_ns(current)) > return; > Sounds like there might scope for other wrappers - is_current_in_user_init_ns() Acked-by: Balbir Singh