Re: [PATCH net] mpls: fix af_mpls dependencies

From: Randy Dunlap
Date: Tue Jun 11 2019 - 19:11:39 EST


On 6/9/19 7:57 PM, David Miller wrote:
> From: Matteo Croce <mcroce@xxxxxxxxxx>
> Date: Sat, 8 Jun 2019 14:50:19 +0200
>
>> MPLS routing code relies on sysctl to work, so let it select PROC_SYSCTL.
>>
>> Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>> Suggested-by: David Ahern <dsahern@xxxxxxxxx>
>> Signed-off-by: Matteo Croce <mcroce@xxxxxxxxxx>
>
> Applied, thanks.
>

This patch causes build errors when
# CONFIG_PROC_FS is not set
because PROC_SYSCTL depends on PROC_FS. The build errors are not
in fs/proc/ but in other places in the kernel that never expect to see
PROC_FS not set but PROC_SYSCTL=y.

I see the following 2 build errors:

../kernel/sysctl_binary.c: In function 'binary_sysctl':
../kernel/sysctl_binary.c:1305:37: error: 'struct pid_namespace' has no member named 'proc_mnt'; did you mean 'proc_work'?
mnt = task_active_pid_ns(current)->proc_mnt;
^~~~~~~~

../fs/xfs/xfs_sysctl.c:80:19: error: 'xfs_panic_mask_proc_handler' undeclared here (not in a function); did you mean 'xfs_panic_mask'?
.proc_handler = xfs_panic_mask_proc_handler,
^~~~~~~~~~~~~~~~~~~~~~~~~~~



The patch's line:
+ select PROC_SYSCTL

should not be done unless PROC_FS is enabled, e.g.:
select PROC_SYSCTL if PROC_FS
but that still doesn't help the mpls driver operate as it should.

The patch should have been
depends on PROC_SYSCTL

As it stands now (in linux-next), this patch should be reverted IMO.


--
~Randy