From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:50252 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932345AbeCOSor (ORCPT ); Thu, 15 Mar 2018 14:44:47 -0400 Date: Thu, 15 Mar 2018 14:44:45 -0400 (EDT) Message-Id: <20180315.144445.1980513652595896732.davem@davemloft.net> To: mrv@mojatatu.com Cc: netdev@vger.kernel.org, jhs@mojatatu.com, amir@vadai.me, xiyou.wangcong@gmail.com, jiri@resnulli.us Subject: Re: [PATCH net-next 1/1] net sched actions: return explicit error when tunnel_key mode is not specified From: David Miller In-Reply-To: <1520886058-18337-1-git-send-email-mrv@mojatatu.com> References: <1520886058-18337-1-git-send-email-mrv@mojatatu.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Roman Mashak Date: Mon, 12 Mar 2018 16:20:58 -0400 > If set/unset mode of the tunnel_key action is not provided, ->init() still > returns 0, and the caller proceeds with bogus 'struct tc_action *' object, > this results in crash: > > % tc actions add action tunnel_key src_ip 1.1.1.1 dst_ip 2.2.2.1 id 7 index 1 ... > Fixes: d0f6dd8a914f ("net/sched: Introduce act_tunnel_key") > Signed-off-by: Roman Mashak Applied to net and queued up for -stable.