From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v2] net: sched: action_ife: take reference to meta module Date: Tue, 04 Sep 2018 12:21:43 -0700 (PDT) Message-ID: <20180904.122143.357979347828802599.davem@davemloft.net> References: <1536011082-2043-1-git-send-email-vladbu@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, xiyou.wangcong@gmail.com, jhs@mojatatu.com, jiri@resnulli.us To: vladbu@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:33390 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727872AbeIDXsN (ORCPT ); Tue, 4 Sep 2018 19:48:13 -0400 In-Reply-To: <1536011082-2043-1-git-send-email-vladbu@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vlad Buslov Date: Tue, 4 Sep 2018 00:44:42 +0300 > Recent refactoring of add_metainfo() caused use_all_metadata() to add > metainfo to ife action metalist without taking reference to module. This > causes warning in module_put called from ife action cleanup function. > > Implement add_metainfo_and_get_ops() function that returns with reference > to module taken if metainfo was added successfully, and call it from > use_all_metadata(), instead of calling __add_metainfo() directly. > > Example warning: ... > Fixes: 5ffe57da29b3 ("act_ife: fix a potential deadlock") > Signed-off-by: Vlad Buslov > --- > > Changes V1->V2: > - fold constants into helper function Applied to 'net'.