2014-11-25 02:42:57

by Stephen Rothwell

[permalink] [raw]
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 [email protected]

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


Attachments:
(No filename) (819.00 B)
OpenPGP digital signature

2014-11-25 11:24:14

by Marcelo Ricardo Leitner

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with the vfs tree

On 25-11-2014 00:42, Stephen Rothwell wrote:
> 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).
>

Looks good to me, thanks Stephen.

Marcelo

2014-11-25 15:54:35

by Pablo Neira Ayuso

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with the vfs tree

On Tue, Nov 25, 2014 at 09:23:52AM -0200, Marcelo Ricardo Leitner wrote:
> On 25-11-2014 00:42, Stephen Rothwell wrote:
> >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).
> >
>
> Looks good to me, thanks Stephen.

Also to me, thanks Stephen and Marcelo.