From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH v2 3/5] netlink: move extack setting into validate_nla()
Date: Wed, 19 Sep 2018 21:52:48 +0200 [thread overview]
Message-ID: <1537386768.10305.72.camel@sipsolutions.net> (raw)
In-Reply-To: <20180919194905.16462-4-johannes@sipsolutions.net> (sfid-20180919_214938_218448_122CE2E9)
On Wed, 2018-09-19 at 21:49 +0200, Johannes Berg wrote:
>
> case NLA_REJECT:
> - if (pt->validation_data && error_msg)
> - *error_msg = pt->validation_data;
> + NL_SET_BAD_ATTR(extack, nla);
> + if (extack && pt->validation_data)
> + extack->_msg = pt->validation_data;
> return -EINVAL;
Damn. This of course needs to happen only if pt->validation_data is set,
otherwise it needs to "goto out_err" to set the default message.
I'll respin another day with that fixed, and any other comments that
come in until then addressed.
Sorry for the noise :-(
johannes
next prev parent reply other threads:[~2018-09-20 1:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 19:49 [PATCH v2 0/5] netlink: nested policy validation Johannes Berg
[not found] ` <20180919194905.16462-1-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-09-19 19:49 ` [PATCH v2 1/5] netlink: remove NLA_NESTED_COMPAT Johannes Berg
2018-09-20 14:54 ` David Laight
[not found] ` <15cc8087b97d4b8693fad397b27f4d10-1XygrNkDbNvwg4NCKwmqgw@public.gmane.org>
2018-09-20 14:56 ` Johannes Berg
2018-09-20 17:06 ` Johannes Berg
2018-09-19 19:49 ` [PATCH v2 2/5] netlink: make validation_data const Johannes Berg
2018-09-19 19:49 ` [PATCH v2 3/5] netlink: move extack setting into validate_nla() Johannes Berg
2018-09-19 19:52 ` Johannes Berg [this message]
2018-09-19 19:49 ` [PATCH v2 4/5] netlink: allow NLA_NESTED to specify nested policy to validate Johannes Berg
2018-09-19 19:49 ` [PATCH v2 5/5] netlink: add nested array policy validation Johannes Berg
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=1537386768.10305.72.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=dsahern@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).