Re: linux-next: manual merge of the vfs tree with the parisc-hd tree

From: Xiaoming Ni
Date: Sun May 10 2020 - 21:55:48 EST


On 2020/5/11 9:11, Stephen Rothwell wrote:
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

kernel/sysctl.c

between commit:

b6522fa409cf ("parisc: add sysctl file interface panic_on_stackoverflow")

from the parisc-hd tree and commit:

f461d2dcd511 ("sysctl: avoid forward declarations")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.



Kernel/sysctl.c contains more than 190 interface files, and there are a large number of config macro controls. When modifying the sysctl interface directly in kernel/sysctl.c , conflicts are very easy to occur.

At the same time, the register_sysctl_table() provided by the system can easily add the sysctl interface, and there is no conflict of kernel/sysctl.c .

Should we add instructions in the patch guide (coding-style.rst submitting-patches.rst):
Preferentially use register_sysctl_table() to add a new sysctl interface, centralize feature codes, and avoid directly modifying kernel/sysctl.c ?

In addition, is it necessary to transfer the architecture-related sysctl interface to arch/xxx/kernel/sysctl.c ?

Thanks
Xiaoming Ni