From: Johannes Berg <johannes@sipsolutions.net>
To: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] nl80211: Reset split_start on error path when split dump is not used
Date: Thu, 16 Jan 2014 14:53:16 +0100 [thread overview]
Message-ID: <1389880396.4345.6.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <52D7E3C1.4090308@gmail.com> (sfid-20140116_145102_990344_1690246A)
On Thu, 2014-01-16 at 14:50 +0100, Pontus Fuchs wrote:
> On 2014-01-16 14:41, Johannes Berg wrote:
> > On Thu, 2014-01-16 at 14:34 +0100, Pontus Fuchs wrote:
> >> When the netlink skb is exhausted split_start is left set. In the
> >> subsequent retry, with a larger buffer, the dump is continued from the
> >> failing point instead of from the beginning.
> >
> > Hmm. Maybe it should be like this instead?
> >
> > johannes
> >
> > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> > index 138dc3b..2e08af5 100644
> > --- a/net/wireless/nl80211.c
> > +++ b/net/wireless/nl80211.c
> > @@ -1680,6 +1680,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
> > !skb->len &&
> > cb->min_dump_alloc < 4096) {
> > cb->min_dump_alloc = 4096;
> > + state->split_start = 0;
> > rtnl_unlock();
> > return 1;
> > }
>
> Will that not cause problem if split scan is in use and one of the split
> chunks needs to be resent due to EMSGSIZE?
That's not supposed to happen, and the "!skb->len" check should catch
it.
johannes
next prev parent reply other threads:[~2014-01-16 13:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 13:34 [PATCH] nl80211: Reset split_start on error path when split dump is not used Pontus Fuchs
2014-01-16 13:41 ` Johannes Berg
2014-01-16 13:50 ` Pontus Fuchs
2014-01-16 13:53 ` Johannes Berg [this message]
2014-01-16 13:59 ` Pontus Fuchs
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=1389880396.4345.6.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=pontus.fuchs@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).