LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Miller <davem@davemloft.net>,
	Networking <netdev@vger.kernel.org>,
	Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	Chris Novakovic <chris@chrisn.me.uk>
Subject: linux-next: manual merge of the net-next tree with the vfs tree
Date: Thu, 17 May 2018 11:34:50 +1000	[thread overview]
Message-ID: <20180517113450.182c8259@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3612 bytes --]

Hi all,

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

  net/ipv4/ipconfig.c

between commits:

  3f3942aca6da ("proc: introduce proc_create_single{,_data}")
  c04d2cb2009f ("ipconfig: Write NTP server IPs to /proc/net/ipconfig/ntp_servers")

from the vfs tree and commit:

  4d019b3f80dc ("ipconfig: Create /proc/net/ipconfig directory")

from the net-next tree.

I fixed it up (see below - there may be more to do) 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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv4/ipconfig.c
index bbcbcc113d19,86c9f755de3d..000000000000
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@@ -1282,6 -1317,74 +1317,61 @@@ static int pnp_seq_show(struct seq_fil
  			   &ic_servaddr);
  	return 0;
  }
 -
 -static int pnp_seq_open(struct inode *indoe, struct file *file)
 -{
 -	return single_open(file, pnp_seq_show, NULL);
 -}
 -
 -static const struct file_operations pnp_seq_fops = {
 -	.open		= pnp_seq_open,
 -	.read		= seq_read,
 -	.llseek		= seq_lseek,
 -	.release	= single_release,
 -};
 -
+ /* Create the /proc/net/ipconfig directory */
+ static int __init ipconfig_proc_net_init(void)
+ {
+ 	ipconfig_dir = proc_net_mkdir(&init_net, "ipconfig", init_net.proc_net);
+ 	if (!ipconfig_dir)
+ 		return -ENOMEM;
+ 
+ 	return 0;
+ }
+ 
+ /* Create a new file under /proc/net/ipconfig */
+ static int ipconfig_proc_net_create(const char *name,
+ 				    const struct file_operations *fops)
+ {
+ 	char *pname;
+ 	struct proc_dir_entry *p;
+ 
+ 	if (!ipconfig_dir)
+ 		return -ENOMEM;
+ 
+ 	pname = kasprintf(GFP_KERNEL, "%s%s", "ipconfig/", name);
+ 	if (!pname)
+ 		return -ENOMEM;
+ 
+ 	p = proc_create(pname, 0444, init_net.proc_net, fops);
+ 	kfree(pname);
+ 	if (!p)
+ 		return -ENOMEM;
+ 
+ 	return 0;
+ }
+ 
+ /* Write NTP server IP addresses to /proc/net/ipconfig/ntp_servers */
+ static int ntp_servers_seq_show(struct seq_file *seq, void *v)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < CONF_NTP_SERVERS_MAX; i++) {
+ 		if (ic_ntp_servers[i] != NONE)
+ 			seq_printf(seq, "%pI4\n", &ic_ntp_servers[i]);
+ 	}
+ 	return 0;
+ }
+ 
+ static int ntp_servers_seq_open(struct inode *inode, struct file *file)
+ {
+ 	return single_open(file, ntp_servers_seq_show, NULL);
+ }
+ 
+ static const struct file_operations ntp_servers_seq_fops = {
+ 	.open		= ntp_servers_seq_open,
+ 	.read		= seq_read,
+ 	.llseek		= seq_lseek,
+ 	.release	= single_release,
+ };
  #endif /* CONFIG_PROC_FS */
  
  /*
@@@ -1356,8 -1459,20 +1446,20 @@@ static int __init ip_auto_config(void
  	int err;
  	unsigned int i;
  
+ 	/* Initialise all name servers and NTP servers to NONE (but only if the
+ 	 * "ip=" or "nfsaddrs=" kernel command line parameters weren't decoded,
+ 	 * otherwise we'll overwrite the IP addresses specified there)
+ 	 */
+ 	if (ic_set_manually == 0) {
+ 		ic_nameservers_predef();
+ 		ic_ntp_servers_predef();
+ 	}
+ 
  #ifdef CONFIG_PROC_FS
 -	proc_create("pnp", 0444, init_net.proc_net, &pnp_seq_fops);
 +	proc_create_single("pnp", 0444, init_net.proc_net, pnp_seq_show);
+ 
+ 	if (ipconfig_proc_net_init() == 0)
+ 		ipconfig_proc_net_create("ntp_servers", &ntp_servers_seq_fops);
  #endif /* CONFIG_PROC_FS */
  
  	if (!ic_enable)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2018-05-17  1:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  1:34 Stephen Rothwell [this message]
2018-05-17  6:47 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2018-01-25  6:41 Stephen Rothwell
2018-01-09 23:34 Stephen Rothwell
2017-12-08  0:33 Stephen Rothwell
2017-04-07  0:22 Stephen Rothwell
2015-03-30  3:24 Stephen Rothwell
2015-03-30  3:08 Stephen Rothwell
2015-03-13  2:15 Stephen Rothwell
2015-03-13  3:24 ` David Miller
2015-03-13  3:56   ` Al Viro
2015-03-13  4:38     ` Stephen Rothwell
2015-03-13 16:37       ` Al Viro
2015-03-13  4:52     ` David Miller
2014-11-25  2:42 Stephen Rothwell
2014-11-25 11:23 ` Marcelo Ricardo Leitner
2014-11-25 15:56   ` Pablo Neira Ayuso
2012-09-05  2:02 Stephen Rothwell
2012-09-05  4:55 ` Masatake YAMATO

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=20180517113450.182c8259@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=chris@chrisn.me.uk \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --subject='Re: linux-next: manual merge of the net-next tree with the vfs tree' \
    /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

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).