[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGnkfhx_h1d6k+wZk7xZXnECDZ+Z+oLw9zAWvDFRe+mHLksszA@mail.gmail.com>
Date: Fri, 7 Jun 2019 20:20:40 +0200
From: Matteo Croce <mcroce@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Randy Dunlap <rdunlap@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH linux-next v2] mpls: don't build sysctl related code when
sysctl is disabled
On Fri, Jun 7, 2019 at 7:14 PM David Ahern <dsahern@...il.com> wrote:
>
> On 6/6/19 6:36 PM, Matteo Croce wrote:
> > Some sysctl related code and data structures is never referenced
> > when CONFIG_SYSCTL is not set.
> > While this is usually harmless, it produces a build failure since sysctl
> > shared variables exists, due to missing sysctl_vals symbol:
> >
> > ld: net/mpls/af_mpls.o: in function `mpls_platform_labels':
> > af_mpls.c:(.text+0x162a): undefined reference to `sysctl_vals'
> > ld: net/mpls/af_mpls.o:(.rodata+0x830): undefined reference to `sysctl_vals'
> > ld: net/mpls/af_mpls.o:(.rodata+0x838): undefined reference to `sysctl_vals'
> > ld: net/mpls/af_mpls.o:(.rodata+0x870): undefined reference to `sysctl_vals'
> >
> > Fix this by moving all sysctl related code under #ifdef CONFIG_SYSCTL
> >
> > Reported-by: Randy Dunlap <rdunlap@...radead.org>
> > Signed-off-by: Matteo Croce <mcroce@...hat.com>
> > ---
> >
> > v1 -> v2: fix a crash on netns destroy
> >
> > net/mpls/af_mpls.c | 393 ++++++++++++++++++++++++---------------------
> > 1 file changed, 207 insertions(+), 186 deletions(-)
> >
>
> As I recall you need to set platform_labels for the mpls code to even
> work, so building mpls_router without sysctl is pointless.
This would explain why so much code went under the #ifdef.
Should we select or depend on sysctl maybe?
Regards,
--
Matteo Croce
per aspera ad upstream
Powered by blists - more mailing lists