From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [PATCH v2 3/5] netlink: move extack setting into validate_nla() Date: Wed, 19 Sep 2018 21:52:48 +0200 Message-ID: <1537386768.10305.72.camel@sipsolutions.net> References: <20180919194905.16462-1-johannes@sipsolutions.net> <20180919194905.16462-4-johannes@sipsolutions.net> (sfid-20180919_214938_218448_122CE2E9) Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: David Ahern To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Return-path: Received: from s3.sipsolutions.net ([144.76.43.62]:59558 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbeITBc1 (ORCPT ); Wed, 19 Sep 2018 21:32:27 -0400 In-Reply-To: <20180919194905.16462-4-johannes@sipsolutions.net> (sfid-20180919_214938_218448_122CE2E9) Sender: netdev-owner@vger.kernel.org List-ID: 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