[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150121121748.GD12570@casper.infradead.org>
Date: Wed, 21 Jan 2015 12:17:48 +0000
From: Thomas Graf <tgraf@...g.ch>
To: Ying Xue <ying.xue@...driver.com>
Cc: davem@...emloft.net, kaber@...sh.net, herbert@...dor.apana.org.au,
paulmck@...ux.vnet.ibm.com, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org
Subject: Re: [PATCH 2/3] netlink: Mark dumps as inconsistent which have been
interrupted by a resize
On 01/21/15 at 04:13pm, Ying Xue wrote:
> On 01/20/2015 09:20 PM, Thomas Graf wrote:
> > A deferred resize of nl_table causes the offsets that Netlink diag keeps
> > to become inaccurate. Mark the dump as inconsistent and have user space
> > request a new dump.
> >
> > Signed-off-by: Thomas Graf <tgraf@...g.ch>
> > ---
> > net/netlink/af_netlink.c | 10 ++++++++++
> > net/netlink/af_netlink.h | 1 +
> > net/netlink/diag.c | 1 +
> > 3 files changed, 12 insertions(+)
> >
> > diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> > index 7a94185..e214557 100644
> > --- a/net/netlink/af_netlink.c
> > +++ b/net/netlink/af_netlink.c
> > @@ -91,6 +91,9 @@ static inline int netlink_is_kernel(struct sock *sk)
> > struct netlink_table *nl_table;
> > EXPORT_SYMBOL_GPL(nl_table);
> >
> > +atomic_t nl_table_seq;
>
> It sounds like the atomic variable is not initialized.
Thanks for the review. We also need to avoid hitting 0 when we overflow
on a seq increment. The netfilter code is doing this correctly but several
other users are suffering from this as well.
I'll address this in v2 together with the other discussed changes.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists