lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Nov 2014 13:42:46 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
	Al Viro <viro@...IV.linux.org.uk>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
	Marcelo Leitner <mleitner@...hat.com>,
	Pablo Neira Ayuso <pablo@...filter.org>
Subject: linux-next: manual merge of the net-next tree with the vfs tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in
net/netfilter/nf_log.c between commit e71456ae9871 ("netfilter: Remove
checks of seq_printf() return values") from the vfs tree and commit
0c26ed1c07f1 ("netfilter: nf_log: Introduce nft_log_dereference()
macro") from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc net/netfilter/nf_log.c
index 6e3b9117db1f,49a64174f3f1..000000000000
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@@ -294,39 -303,35 +303,37 @@@ static int seq_show(struct seq_file *s
  {
  	loff_t *pos = v;
  	const struct nf_logger *logger;
 -	int i, ret;
 +	int i;
  	struct net *net = seq_file_net(s);
  
- 	logger = rcu_dereference_protected(net->nf.nf_loggers[*pos],
- 					   lockdep_is_held(&nf_log_mutex));
+ 	logger = nft_log_dereference(net->nf.nf_loggers[*pos]);
  
  	if (!logger)
 -		ret = seq_printf(s, "%2lld NONE (", *pos);
 +		seq_printf(s, "%2lld NONE (", *pos);
  	else
 -		ret = seq_printf(s, "%2lld %s (", *pos, logger->name);
 +		seq_printf(s, "%2lld %s (", *pos, logger->name);
  
 -	if (ret < 0)
 -		return ret;
 +	if (seq_has_overflowed(s))
 +		return -ENOSPC;
  
  	for (i = 0; i < NF_LOG_TYPE_MAX; i++) {
  		if (loggers[*pos][i] == NULL)
  			continue;
  
- 		logger = rcu_dereference_protected(loggers[*pos][i],
- 					   lockdep_is_held(&nf_log_mutex));
+ 		logger = nft_log_dereference(loggers[*pos][i]);
 -		ret = seq_printf(s, "%s", logger->name);
 -		if (ret < 0)
 -			return ret;
 -		if (i == 0 && loggers[*pos][i + 1] != NULL) {
 -			ret = seq_printf(s, ",");
 -			if (ret < 0)
 -				return ret;
 -		}
 +		seq_printf(s, "%s", logger->name);
 +		if (i == 0 && loggers[*pos][i + 1] != NULL)
 +			seq_printf(s, ",");
 +
 +		if (seq_has_overflowed(s))
 +			return -ENOSPC;
  	}
  
 -	return seq_printf(s, ")\n");
 +	seq_printf(s, ")\n");
 +
 +	if (seq_has_overflowed(s))
 +		return -ENOSPC;
 +	return 0;
  }
  
  static const struct seq_operations nflog_seq_ops = {

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ