linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, Randy Dunlap <rdunlap@infradead.org>
Cc: Matteo Croce <mcroce@redhat.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH net] mpls: fix af_mpls dependencies
Date: Fri, 14 Jun 2019 08:07:06 -0600	[thread overview]
Message-ID: <47f1889a-e919-e3fd-f90c-39c26cb1ccbb@gmail.com> (raw)
In-Reply-To: <CAK8P3a1mwnDFeD3xnQ6bm1x8C6yX=YEccxN2jknvTbRiCfD=Bg@mail.gmail.com>

On 6/14/19 8:01 AM, Arnd Bergmann wrote:
> On Wed, Jun 12, 2019 at 9:41 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>> On 6/11/19 5:08 PM, Matteo Croce wrote:
>>> On Wed, Jun 12, 2019 at 1:07 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>> * Configure standard kernel features (expert users)
>>> *
>>> Configure standard kernel features (expert users) (EXPERT) [Y/?] y
>>>   Multiple users, groups and capabilities support (MULTIUSER) [Y/n/?] y
>>>   sgetmask/ssetmask syscalls support (SGETMASK_SYSCALL) [N/y/?] n
>>>   Sysfs syscall support (SYSFS_SYSCALL) [N/y/?] n
>>>   Sysctl syscall support (SYSCTL_SYSCALL) [N/y/?] (NEW)
>>
>> So I still say that MPLS_ROUTING should depend on PROC_SYSCTL,
>> not select it.
> 
> It clearly shouldn't select PROC_SYSCTL, but I think it should not
> have a 'depends on' statement either. I think the correct fix for the
> original problem would have been something like
> 
> --- a/net/mpls/af_mpls.c
> +++ b/net/mpls/af_mpls.c
> @@ -2659,6 +2659,9 @@ static int mpls_net_init(struct net *net)
>         net->mpls.ip_ttl_propagate = 1;
>         net->mpls.default_ttl = 255;
> 
> +       if (!IS_ENABLED(CONFIG_PROC_SYSCTL))
> +               return 0;
> +
>         table = kmemdup(mpls_table, sizeof(mpls_table), GFP_KERNEL);
>         if (table == NULL)
>                 return -ENOMEM;
> 

Without sysctl, the entire mpls_router code is disabled. So if sysctl is
not enabled there is no point in building this file.

  reply	other threads:[~2019-06-14 14:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-08 12:50 [PATCH net] mpls: fix af_mpls dependencies Matteo Croce
2019-06-10  2:57 ` David Miller
2019-06-11 23:06   ` Randy Dunlap
2019-06-12  0:08     ` Matteo Croce
2019-06-12  2:39       ` Randy Dunlap
2019-06-14 14:01         ` Arnd Bergmann
2019-06-14 14:07           ` David Ahern [this message]
2019-06-14 14:26             ` Arnd Bergmann
2019-06-14 14:54               ` Eric W. Biederman
2019-06-14 15:10               ` Randy Dunlap

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=47f1889a-e919-e3fd-f90c-39c26cb1ccbb@gmail.com \
    --to=dsahern@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /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).