From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: [PATCH v2 0/5] netlink: nested policy validation Date: Wed, 19 Sep 2018 21:49:00 +0200 Message-ID: <20180919194905.16462-1-johannes@sipsolutions.net> Cc: David Ahern To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Return-path: Received: from s3.sipsolutions.net ([144.76.43.62]:59442 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727844AbeITB2p (ORCPT ); Wed, 19 Sep 2018 21:28:45 -0400 Sender: netdev-owner@vger.kernel.org List-ID: Ok, I should've tried the idea that David came up with first - it does in fact make the code quite a bit simpler, and indeed removes the need for the previously introduced "**error_msg" argument that I hadn't really liked anyway. So, changes here are: * move setting the bad attr pointer/message into validate_nla() * remove the recursion patch since that's no longer needed * simply skip the generic bad attr pointer/message setting in case of nested nla_validate() failing since that could fail only due to validate_nla() failing inside, which already sets the extack information johannes