linux-next: manual merge of the net-next tree with the vfs tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx

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 = {

Attachment: pgp5wyH44LgRi.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux